cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Stefan_Moser
Level III

Window popup for SQL query that gives user feedback on #rows fetched

Working in JMP 18. I'm having a challenge recreating what I thought used to be a feature when pulling data from a database. 

 

I am working in a workflow, and the first step is pulling data from one of our internal databases. The JSL was pulled directly from query builder. 

 

The desired behavior is that the user runs the step, and while the query runs (it takes a few minutes), a window pops up giving the user feedback on the # of rows fetched. The workflow should wait until the query completes and the output table is present before proceeding. I have been unsuccessful in getting the pop-up window to show up, although I seem to remember this working in the past. What I've tried:
1. Use 'run foreground' - runs and workflow continues running once query is complete, but 'freezes' JMP while the query runs

2. Use 'run background' - runs and doesn't freeze but doesn't have a popup window with the rows fetched and breaks the workflow since it tries to proceed to the next step before the data loads

3. Use' run background' and add a JSL loop that checks if query is done before proceeding to next step - runs, doesn't freeze, and only progresses in workflow once the query is complete, but again there is no user feedback showing the 'rows fetched' window

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Window popup for SQL query that gives user feedback on #rows fetched

I assume you mean this one (I'm not sure if it is possible to display that when using << Run Background):

jthi_0-1759985645963.png

You could maybe build your own utilizing Running Queries and custom New Window where you pick the values from Running Queries window and update the custom window inside your loop.

-Jarmo

View solution in original post

8 REPLIES 8
jthi
Super User

Re: Window popup for SQL query that gives user feedback on #rows fetched

With option three you won't get as "clean" rows fetched with this but you could maybe use Running Queries window

Main Menu("View:Running Queries");

jthi_0-1759949268029.png

 

-Jarmo
Stefan_Moser
Level III

Re: Window popup for SQL query that gives user feedback on #rows fetched

yeah I considered that but it's a bit clunky for a tool I'm building for a large team... do you know about the 'fetching rows' window I'm talking about? I somehow can't get it to pop up again no matter what

jthi
Super User

Re: Window popup for SQL query that gives user feedback on #rows fetched

I assume you mean this one (I'm not sure if it is possible to display that when using << Run Background):

jthi_0-1759985645963.png

You could maybe build your own utilizing Running Queries and custom New Window where you pick the values from Running Queries window and update the custom window inside your loop.

-Jarmo
Stefan_Moser
Level III

Re: Window popup for SQL query that gives user feedback on #rows fetched

Yes! That's the one. I don't need to run it in background, i can run foreground but even when I have it execute with 'Run Foreground' I don't get the fetching records window and it just seems like JMP is completely frozen. 

jthi
Super User

Re: Window popup for SQL query that gives user feedback on #rows fetched

That usually depends on your SQL query. It can take take some time before the data fetching starts while other processing phases are being performed on the server, and JMP will appear frozen until it is able to start fetching data.

-Jarmo
Stefan_Moser
Level III

Re: Window popup for SQL query that gives user feedback on #rows fetched

Understood, sounds like because the query is spending most of its time not fetching the data I may just be missing the 'fetching records' dialogue or it's so short (few thousand rows) that it never pops up. 

jthi
Super User

Re: Window popup for SQL query that gives user feedback on #rows fetched

Hopefully @briancorcoran is correct person from JMP to tag to give proper explanation but that would be my guess. I do have plenty of queries which I run from JMP, some of them do take quite a while (more complicated queries generally) to display the window and some do display it immediately, most likely because fetching starts immediately due to simpler execution plan.

-Jarmo

Re: Window popup for SQL query that gives user feedback on #rows fetched

Running in the foreground is the way to do it.

The Fetching records progress bar will automatically pop up after a few seconds when there are a lot of rows to import.

For instance, this table is over 600,000 rows.

bryan_boone_0-1760103214953.png

It should be noted that in most cases, "Fetching records" is not one record from the database at a time. In many cases JMP can retrieve say, 500 records at a time.

 

Recommended Articles