How do you stop a running query in SnowSQL
Asked Answered
H

2

6

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?

Hardener answered 15/5, 2020 at 19:41 Comment(1)
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?Millais
B
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
Bulbul answered 16/5, 2020 at 1:7 Comment(2)
Must be a Linux / osx bugMillais
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 askedHardener
B
6

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.

Bushed answered 11/2, 2022 at 15:59 Comment(0)
B
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
Bulbul answered 16/5, 2020 at 1:7 Comment(2)
Must be a Linux / osx bugMillais
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 askedHardener

© 2022 - 2025 — McMap. All rights reserved.