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
hupin
Level II

Save template of data table as JSL script

Dears,

 

I'm doing some data preparation actions (e.g. standardize colums format, change header name, add formula...) based on one jmp data table,

want to save those actions into script (similar like macro in excel) then later can used it for other set of data table doing the same things

 

kindly asking is there a way to do it ?  if possible, can anyone show steps how to make it into JSL?

thanks

 

Hu Pin

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Record data preparation actions into script

You could also simply save the final version of the data table (finished columns, table variables and scripts, et cetera) without any rows to be used in the future as a template. Simply populate the columns with new data as needed. You don't necessarily need a script for everything. (There might be more to your request that was not stated that makes a script a better solution.)

View solution in original post

sseligman
Staff

Re: Record data preparation actions into script

Another way to save the "template" of the data table is to click on the red triangle drop down menu next to the table name in the Tables panel (top lefthand corner of the data table) and click on "Copy Table Script."

 

Then, open a new script window, paste the script and save it for later use. The script could be modified to remove the actual data values and just keep the pieces essential to your template (e.g. formulas, data/modeling types, formats, etc.).

View solution in original post

8 REPLIES 8
hupin
Level II

Re: Record data preparation actions into script

I found it

DVLuna
Level III

Re: Record data preparation actions into script

I have the exact same issue, but the solution to this post is "I found it".

 

Can someone post where the information is to perform this type of action?

Re: Record data preparation actions into script

You could also simply save the final version of the data table (finished columns, table variables and scripts, et cetera) without any rows to be used in the future as a template. Simply populate the columns with new data as needed. You don't necessarily need a script for everything. (There might be more to your request that was not stated that makes a script a better solution.)

DVLuna
Level III

Re: Record data preparation actions into script

I have been creating scripts for everything from reusing scripts, graphs and formatting.

 

It sounds like I should have been using the template concept the whole time.

 

Can you point me to any documentation/instructions on how to setup and use templates?

 

Dave

 

dale_lehman
Level VII

Re: Record data preparation actions into script

I generally like to avoid scripting - my own preference is to use built in functionality wherever possible.  However, in this case, the template table will not accomplish what I want - my personal view of this query.  I am interested in documenting the work flow, not just for the analysis, but for the data preparation.  One advantage of tools such as Alteryx or KNIME is their ability to document all of the stages of data preparation.  Looking at the formulas that are in the JMP table template will not show enough of the preparation - simple things like changing data types, replacing 0 values with missing, etc.  A column recode can show that 0 was replace with missing, but it is nearly impossible to recreate the entire data cleansing process from the formulas imbedded into created columns.

 

So, while this solution may work for some, I am still interested in finding ways to answer the original question.  If "found it" indeed means there is a way that was found, can someone please share it?

Byron_JMP
Staff

Re: Record data preparation actions into script

It sounds like you migh have a lot of more general questions related to scripting data clean-up, but with respect to recoding, my practice is to use the "recode script" option.   I can begin to recode, then stop, save and run the recode script, do more recodeing, and then merge the new chages with the old recode script in the table.   All of this is just button clicking to generate the recode script and to do the recode merge. 

Recenlty I've been using query builder to get data, so then I just copy the recode script to the post query script tab and I get pre-cleaned data when I run the query the next time.  

As far as documenting the changes goes, the recode script its self is a pretty good record and the script is explicit and easy enough to read that I can edit my redoce mistakes later. 

JMP Systems Engineer, Health and Life Sciences (Pharma)

Re: Record data preparation actions into script

Just throwing a thought over the fence on this one - why not use the session script... You can then clean up the JSL after you've got the session script.

M
sseligman
Staff

Re: Record data preparation actions into script

Another way to save the "template" of the data table is to click on the red triangle drop down menu next to the table name in the Tables panel (top lefthand corner of the data table) and click on "Copy Table Script."

 

Then, open a new script window, paste the script and save it for later use. The script could be modified to remove the actual data values and just keep the pieces essential to your template (e.g. formulas, data/modeling types, formats, etc.).