Questions tagged [snowsql]

SnowSQL is a command line tool for connecting to the Snowflake analytic data warehouse which is a Software-as-a-Service (SaaS) product.

SnowSQL is the next-generation command line client for connecting to Snowflake to execute SQL queries and perform all DDL and DML operations, including loading data into and unloading data out of database tables.

Snowflake is an analytic data warehouse provided as Software-as-a-Service (SaaS). Snowflake provides a data warehouse that is faster, easier to use, and far more flexible than traditional data warehouse offerings.

Link to documentation and more information

110 questions
1
vote
1 answer

Snowflake SQL Query Left Join Issue

For one of our code, left join is not behaving properly in snowflake. Require your help if you can find solution around the same. We have a sample data setup like mentioned below with basicc table join. CREATE TABLE patient_test(pid INT); INSERT…
1
vote
0 answers

CLI Client(SnowSQL) Not available for Download in Help —> Downloads

Where is the CLI Client(snowSQL) option to download SnowSQL CLI in help—>Download in Snowflake WebUI? Screen Shot attached Screen Shot Help —> Downloads
1
vote
1 answer

how can I use one SQL script for multiple database/warehouse using Snowsql?

I have define the variables inside the SQL script for database and schema. So is there any way to run that SQL script in different databases and schema at the same time? my SQL script looks like this, use database &{db}; use schema &{sc}; create…
1
vote
1 answer

Move S3 files to Snowflake stage using Airflow PUT command

I am trying to find a solution to move files from an S3 bucket to Snowflake internal stage (not table directly) with Airflow but it seems that the PUT command is not supported with current Snowflake operator. I know there are other options like…
1
vote
0 answers

Load GZIP Binary Data in a column in Snowflake DB

I have a csv file which has two columns. First Column is an id and second column is the compressed GZIP binary data. I want to load this record into the Snowflake table with having two columns id as number data type and bin_text as binary data…
1
vote
1 answer

Change Snowflake Database Owner

We are trying to display data in a database that belongs to ACCOUNTADMIN role using AWS QuickSight. The problem is when we are trying to connect QuickSight to Snowflake, QuickSight automatically uses database that is in SYSADMIN role, there is no…
1
vote
1 answer

Errno 22 Invalid argument: In Snowsql

I'm trying to execute a sql script using snowsql in below ways: option1: !source C:\Users\"Local PC"\Documents\snowsql\test.sql; or !source C:\Users\Local%20PC\Documents\snowsql\test.sql; I'm getting the below error. File is available in the…
harika
  • 11
  • 1
1
vote
2 answers

escape double quotes in snowflake

I'm trying to load the data using copy into command. Field has special character as value \", but FIELD_OPTIONALLY_ENCLOSED_BY its escaping \ and getting error while loading Found character '0' instead of field delimiter ';' DATA:…
marjun
  • 696
  • 5
  • 17
  • 30
1
vote
1 answer

remove special character from string in snowpipe copy command in snowflake

Im trying to load data to snowflake table which is having numeric datatypes but the column value contains number with special character 0,0000 due to this copy command is failing. Is their any chance we can handle this in file format instead of…
marjun
  • 696
  • 5
  • 17
  • 30
1
vote
3 answers

I'm unable to open snowsql as it is getting errors like ModuleNotFoundError

I got this error after loading snowsql Please help File "PyInstaller/loader/rthooks/pyi_rth_pkgres.py", line 11, in File…
1
vote
1 answer

How to create SnowSQL query programmatically

I am new to SnowFlake and exploring new things every day. I am stuck with the below scenario. SELECT '{COL}' AS field_name, a.{COL}AS old_value, b.{COL}AS new_value FROM A JOIN B ON(...) WHERE a.{COL} != b.{COL} I want to…
1
vote
2 answers

Why can't SnowSQL 1.2.2 find a version to download?

First thing I do after unpacking the SnowSQL Linux client is try to upgrade it. This has worked very well through at least v1.1.84. Today I downloaded v1.2.2, installed it, and got an error: $ ~/bin/snowsql -Uv No snowsql is available for download:…
theory
  • 9,178
  • 10
  • 59
  • 129
1
vote
0 answers

Case-sensitive Okta URLs do not work with snowsql and Python connector. Any workaround?

If you're trying to connect to Snowflake with snowsql or Python connector (apparently used internally by snowsql) using Okta SSO and your Okta URL includes case-sensitive parts--you're in bad luck: snowsql -o log_level=DEBUG -a -u…
Lev Himmelfarb
  • 113
  • 1
  • 5
1
vote
1 answer

snowflake Need to run sql insert in loop based on column value

I have a table as below id date. no_of Days 12 12-03-1999 30 13 12-03-1999 7 14 12-03-1999 22 15 12-03-1999 12 I need to create another table with one extra field as…
danD
  • 666
  • 1
  • 7
  • 29
1
vote
2 answers

Merge Function limitation in snowflake

I am trying to convert a merge function that runs in Oracle to Snowflake compatible. When using the merge it is limiting me on the where clause. Please do let me know if any one could help. Error Message: Image I am using merge logic with below…