Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save GregoryWiltshire/26f6a05d9741ba7f22d9b23e2e381c8d to your computer and use it in GitHub Desktop.
Save GregoryWiltshire/26f6a05d9741ba7f22d9b23e2e381c8d to your computer and use it in GitHub Desktop.
Tutorial: PUT to Snowflake Internal Stage
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