How to Save Queried Data Table to a Specified Folder through script?</CODE></PRE><P>Hi! Does anyone here knows how to save a queried data table to a specified folder through jmp script? Can't seem to find the right way in doing it... Thanks in advance!</P><P>Here's my sample script:</P><PRE><CODE class=" language-jsl">Data Table( "name of data table" );
//save raw data table to a folder
dt = current data table ();
filepath = "C:\Users\folder path";
dt<< save(filepath || "name of data table.jmp");
Content OrganizationData Blending and CleanupRe: How to Save Queried Data Table to a Specified Folder through script?Yes. Most of the time it seems to work better to keep a trailing slash on a path:
path = "$temp/mywork/";
Most (all?) functions that need just a path, without a file, are happy with it:
path = "$temp/mywork/";
show(convertFilePath(path,"windows"));
Convert File Path(path, "windows") = "C:\Users\v1\AppData\Local\Temp\mywork\";
and it is clearly not a full filename to anyone looking at the code later.
Re: How to Save Queried Data Table to a Specified Folder through script?I suspect the issue is that there is a "/" missing between your filepath and "name of data table.jmp". Below is a working script that
Names Default To Here( 1 );
Open( "$SAMPLE_DATA\big class.jmp" );
dt = Data Table( "big class" );
filepath = "$TEMP";
Wait( 5 ); // placed for the example so the table will be visible
dt << save( filepath || "\" || "mytable.jmp" );
Close( dt, nosave );
Wait( 5 ); // placed so for the example one can see the table is closed
Open( filepath || "\" || "mytable.jmp" );