cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
spoikayil
Level II

Help consolidating jmp queries and scripts.

I started using jmp recently  for importing manufacturing data directly to jmp tables and analysing them.

Typically my requirement is to extract the data  for each process step in the manufacturing process, for all the batches processed and making charts from them.

So I started with making jmpqueires for each of the processes - and often I want to give the process code as well as the date from which i want the extraction as inputs to the query.

All my jmpqueries therefore has following filters , and I have kept the date as a prompt variable so that I can change it every time I run the query

spoikayil_1-1590690900757.png

 

I also have some post processing script as almost always the data is not stored in the format and shape as I want it to plot charts. This forces me to create a new table from the table that comes out with the original query's extraction.

So, all my jmpqueries end up generating two tables an example is shown below;

spoikayil_2-1590691117176.png

 

This was working pretty good, until now, I want to start consolidating these queries by joining different tables generated by my many different jmp queries.

 

So I start writing the below script which goes:

 

finCDquery = open( "PATH\New M33 final CD.jmpquery", Private );
devCDquery = open( "PATH\New M33 develop CD.jmpquery", Private );

M33finCD = finCDquery << Run Foreground(Private);
M33devCD = devCDquery << Run Foreground(Private);

Data Table( "M33-CD QUERY" ) << Join(
	With( Data Table( "M33D-CD QUERY" ) ),
	Select(.
.
.
.

Now, here are the things I would like to have some help with; because I am not quite getting the expected response.

 

  1. First, every query has the date prompt so I need to wait and give the date and click ok several times in between - how can I modify the queries such that the first date i give is taken and used for all subsequent jmp queries?
  2. Although I am opening the tables I dont want to be visible as Private, they keep showing up nevertheless. What am I doing wrong?
  3. I have the SQL queries for all my jmpqueies, how can I put them in the script rather than opening each of my jmpquery files as I am doing now?

 

 

 

 

 

 

12 REPLIES 12
Georg
Level VII

Re: Help consolidating jmp queries and scripts.

@pmroz  thanks for your Suggestion using general Quotation \[ \], this is another way I even didn't think of.

Unless it might work that way, I personally don't like Hyphens in names and double quotes in SQL …, because I had a lot of pain due to that … in past.

Georg
pmroz
Super User

Re: Help consolidating jmp queries and scripts.

It's difficult to develop SQL in JSL - as @Georg mentions use a tool like SQL Developer or PL/SQL Developer.

I developed the log_execute_sql function a few years ago - it's posted in the file exchange: Error trapping for Oracle ODBC SQL 

That's become an invaluable aid for us to debug SQL in JSL.

spoikayil
Level II

Re: Help consolidating jmp queries and scripts.

@pmroz @Georg  Thanks guys!!
Enclosing the query in \[ does the trick for the second issue.