Snowflake Architecture
Emily Melhuish
Technical Curriculum Developer, Snowflake


External: Files in the Cloud
unstructured data lives in a stage

ENABLE DIRECTORY
CREATE STAGE snowy_peak_files_stage
DIRECTORY = (ENABLE = TRUE);
Refresh directory metadata (ALTER STAGE)
ALTER STAGE snowy_peak_files_stage REFRESH;

SQL
SELECT
file_name
, size
, last_modified
FROM DIRECTORY(@snowy_peak_files_stage);
SQL
SELECT GET_PRESIGNED_URL(@snowy_peak_files_stage, 'avalanche_forecast.pdf', 3600);
You pass stage, file path and lifetime in seconds
Useful for partners who do not have Snowflake logins
Snowflake Architecture