4

Is it possible to stop a running query in the SnowSQL command line tool? Let's say I made a mistake and I tried to run a heavy query. Control-C, Esc, Q... nothing seems to stop it. The only way seems to be to send a kill command.

I also tried to stop a query when I'm paging but it seems like I'm forced to go through all pages before being able to stop.

Is there any way to stop queries in any of these two situations?

jmriego
  • 335
  • 3
  • 15
  • I'm having the same issue on OSX. I run a query that prints data to the screen and I cant kill it with ctrl+d, ctrl+c etc, might be worth raising a support case to get it fixed? – Simon D May 15 '20 at 23:35

2 Answers2

3

This cancels the query.

SELECT SYSTEM$CANCEL_QUERY( 'query_id' )

The query ID can be obtained from the Account->History. Many companies do not allow access to account for developers, but can add permissions to allow access to query history.

2

ctrl+c is working fine for me, I executed a simple query

select * from <HUGE TABLE>;

While the results are getting displayed on the command window I fired the ctrl+c

enter image description here

SnowSQL verion : v1.2.5
Operating System : Windows
  • 1
    Must be a Linux / osx bug – Simon D May 16 '20 at 10:25
  • thanks! it definitely sounds like a bug. I'm using 1.2.5 in Linux and can't stop it. I'll try some other computer and see if it happens often. I'll accept this answer as this is the answer for what I asked – jmriego May 16 '20 at 10:30