cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
JKS
JKS
Level I

Automatically update "source" file

I have an excel file containing large database. I have exported this excel file into JMP to analyze and get insights into the data. The excel file is updated every hour with new sets of data.  Every time the excel file gets updated, I've to click on the "source" file in JMP to update the table, and copy paste template scripts. My question: is there a way to automatically update the data in JMP table whenever the excel file gets updated? so that I do not have to manually click on the "source" file to update it.

1 ACCEPTED SOLUTION

Accepted Solutions
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Automatically update "source" file

Yes absolutely!  You have two basic options:

 

Get new data and append it to the current data table

Useful if you want to keep historical data which isn't available in your source file, and if you aren't worried about old rows changing values.  Check out this post: How do I automatically update JMP data table while populating Excel 

 

Using this method it is also possible to have the table go check for new values automatically while the table is open, but I would only recommend this if table is coming from a database.

 

Make a script to automatically recreate the analysis using the source file.

I think this is more common.  Copy your source script into a new script window, and then copy scripts for any analyses you want to run, or scripts you want to add, and add them to that script.  Then a user opens the script instead of opening a data table. Here is an example:

names default to here(1);

//Source script goes here
dt = Open("$Sample_data/iris.jmp");

//This will save a script the user can run on their own
dt << New Script(
		"My Script",
		New Window("My script is running", Modal, Text Box("Here is your script."))
	);

//This will open automatically	
dt << Graph Builder(
	Size( 531, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :Petal length ), Y( :Sepal width ) ),
	Elements( Points( X, Y, Legend( 2 ) ), Smoother( X, Y, Legend( 3 ) ) )
);

 You can make the script run automatically and hide the script window so the user never sees code, just the data table.

View solution in original post

3 REPLIES 3
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Automatically update "source" file

Yes absolutely!  You have two basic options:

 

Get new data and append it to the current data table

Useful if you want to keep historical data which isn't available in your source file, and if you aren't worried about old rows changing values.  Check out this post: How do I automatically update JMP data table while populating Excel 

 

Using this method it is also possible to have the table go check for new values automatically while the table is open, but I would only recommend this if table is coming from a database.

 

Make a script to automatically recreate the analysis using the source file.

I think this is more common.  Copy your source script into a new script window, and then copy scripts for any analyses you want to run, or scripts you want to add, and add them to that script.  Then a user opens the script instead of opening a data table. Here is an example:

names default to here(1);

//Source script goes here
dt = Open("$Sample_data/iris.jmp");

//This will save a script the user can run on their own
dt << New Script(
		"My Script",
		New Window("My script is running", Modal, Text Box("Here is your script."))
	);

//This will open automatically	
dt << Graph Builder(
	Size( 531, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :Petal length ), Y( :Sepal width ) ),
	Elements( Points( X, Y, Legend( 2 ) ), Smoother( X, Y, Legend( 3 ) ) )
);

 You can make the script run automatically and hide the script window so the user never sees code, just the data table.

JKS
JKS
Level I

Re: Automatically update "source" file

I'm not familiar with writing scripts. Also, I do not want to append data to existing data, I want to update the existing data changes dynamically and also add if new data is added.

 

Is there a way to automatically update the data table in JMP whenever I open the file that is linked to the original excel file.

Re: Automatically update "source" file

Hi @JKS , I think what @ih is proposing will do what you need, although not in exactly your preferred GUI-driven workflow. I am not much of a scripter myself but I think the workflow here would be to simply have JMP generate all of the script for you, and then  simply open a .JSL file and click the "Run" button.  So your workflow would be that each time your Excel file updates with new data, you would go over to JMP, open the same .JSL file, and click the "Run" button.  After that, JMP would bring in the data into a table, and generate all of your analysis all at once, automatically.  So essentially you would be doing almost nothing in JMP, except for opening and running your saved .JSL file. 

 

This type of thing should get even easier in JMP 17 (stay tuned for more details in that release later this year!) The scripting bit already has been greatly simplified for non-scripters like me in JMP 16 (check out the Enhanced Log): The Enhanced Log in JMP 16: This changes everything.  What you will be doing is copy-pasting chunks of code together from the Log to make your .JSL file.  If you need help with your example, please contact us at support@jmp.com (assuming you are an active licensed jmp user), and we will help get you going.   Cheers,  @PatrickGiuliano