Subscribe Bookmark RSS Feed

Record data preparation actions into script

hupin

Community Trekker

Joined:

Aug 11, 2013

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

7 REPLIES
hupin

Community Trekker

Joined:

Aug 11, 2013

I found it

DVLuna

Occasional Contributor

Joined:

Jun 10, 2017

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?

markbailey

Staff

Joined:

Jun 23, 2011

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.)

Learn it once, use it forever!
DVLuna

Occasional Contributor

Joined:

Jun 10, 2017

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

Community Trekker

Joined:

Jan 29, 2015

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

Joined:

Apr 26, 2012

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. 

M_Anderson

Staff

Joined:

Nov 21, 2014

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