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
0
votes
2 answers

Snowflake Stored procedure Copy into Temporary table

Question is related to Snowflake and Snowsql. That said I'm trying to within a stored proc create a temp table and then 'copy into' this temp table from azure blob storage. I'm manually executed the snow sql statements and they work fine. Statement…
0
votes
1 answer

Snowsql command line

Cannot seem to change the location install path of snowsql. windows 10 from command line? Documentation has…
sword
  • 1
0
votes
1 answer

How can I specify 4 different start and end dates for previous year and current year all specifying the 1st day of the month using SET?

I am trying to make SET variables in SnowSQL that will specify the first of each start month and end month for the current year and previous years respectively. I want the code to be able to roll over to the new month as time progresses. So for…
0
votes
1 answer

Need to select bucket name while reading from s3 stage

I am reading from S3 folder in snowflake via stage. The bucket in s3 have multiple folder (or object if we want to call it). The folder is on date basis in the bucket date=2020-06-01 date=2020-06-02 date=2020-06-03 date=2020-06-04 date=2020-06-05 I…
danD
  • 666
  • 1
  • 7
  • 29
0
votes
2 answers

When connecting to snowflake by ODBC and SnowSQL with SSO (SAML), can I connect with IDP initiated?

I want to access snowflake with SAML from ODBC. I can connect with internal snowflake authentication(user & password) from ODBC. At that time, the parameter of authenticator=externalbrowzer. Nothing happens when the browser starts and I authenticate…
ys-sg
  • 15
  • 5
0
votes
1 answer

Column bind variable in Select on Staged File #snowflake-cloud-platform

To stage and query the files the documentation shows this example query: SELECT t.$1, t.$2 FROM @mystage1 (file_format => myformat) t; To simplify string manipulation I'd like to configure Snowflake to use anything but dollar sign as the column…
jhowa1
  • 122
  • 1
  • 5
0
votes
1 answer

Adding current date in create script for Snowflake

I have a requirement where I have to create tables with the date/datetime in the table name when they were created dynamically.Wondering if this option is possible in Snowflake? Eg: I would need somethinglike this. CREATE TABLE…
0
votes
1 answer

SnowSql no response

I am using SnowSql 1.2.5 and I receive no response, no error, absolutely nothing from it. It does not matter which command I type, even if type just "SnowSql.exe" and hit confirm, I get no response. This is happening in an specific machine, in…
0
votes
2 answers

Snowsql not connecting

I did install Snowsql 1.25. Installation went fine. I configure the config file the the right account (xq59548.us-east-2.aws) user and password. My .profile file seems fine and so is the $PATH: Error with zhh - command not found Has anyone…
0
votes
1 answer

How to extract data from complex json stored in Snowflake via SnowSQL?

I have millions of JSON's stored in a single variant column table in Snowflake. They are in the following format, though the number of rows per JSON varies. Please could someone give me some guidance on how to extract the data into a flat table? I'm…
0
votes
2 answers

How can I run .sql file having multiple .sql file inside using Snowsql?

I want to figure out how to run multiple sql files on one go. Suppose I have this test.sql file which has file1.sql, file2.sql and file3.sql and so on. Along with some DML/DDL. use database &{db}; use schema…
patel94
  • 85
  • 2
  • 11
0
votes
1 answer

Snowflake Views - Group Syntax Compilation Error

I have just started exploring Snowflake and was trying to create my first view. And I am getting the below syntax error on grouping. Can anyone guide me here what am I missing? create or replace view MyView_V1 as select …
0
votes
2 answers

Snowflake IP Whitelisting Range when using VPN

I can't log into snowsql via Windows Command Prompt in order to GET files when connected over my companies' VPN. I believe this is a whitelist issue. I've already ran Select SYSTEM$WHITELIST(); then SnowCD and my results are listed below. What is…
Speedy
  • 75
  • 3
  • 9
0
votes
1 answer

Can I use snowflake snowsql !spool command to overwrite existing file?

When I use the !spool command, the target file is appended with the results. Example: $ touch current.spool $ cat curr_ts.sql !spool current.spool select CURRENT_TIMESTAMP; $ snowsql -f curr_ts.sql <--- 1st execution of the script * SnowSQL *…
Beege
  • 665
  • 4
  • 18
0
votes
2 answers

how do i select certain key/value pair from json field inside a SQL table in SNOWFLAKE

I am currently working on building a dataware house in snowflake for the business that i work for and i have encounter some problems. I used to apply the function Json_value in TSQL for extracting certain key/value pair from json format field inside…