Created
November 10, 2020 20:36
-
-
Save GregoryWiltshire/26f6a05d9741ba7f22d9b23e2e381c8d to your computer and use it in GitHub Desktop.
Tutorial: PUT to Snowflake Internal Stage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew cask install snowflake-snowsql | |
snowsql -a <snowflake_instance>.<region> -u <user.name>@COMPANY.com --authenticator=externalbrowser | |
# login with your federated login in your default browser | |
# MACOS | |
> PUT file:///Users/<your_username>/Desktop/test.csv @test_internal_stage; | |
> use database <YOUR_DB>; | |
> create or replace stage test_internal_stage file_format = (type = 'CSV' field_delimiter = ',' skip_header = 0); | |
> list @test_internal_stage; | |
> SELECT $1,$2 FROM '@test_internal_stage/test.csv.gz'; | |
> drop stage test_internal_stage; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment