Sync Snowflake query results to Amazon S3
DatabaseMarketingUtilitiesDeveloper Tool
What it does
When a scheduled query runs in Snowflake, this automation extracts rows from the PUBLIC.DEPT table and uploads the results to Amazon S3. Someone can then access the data file in the S3 bucket for reporting or analysis.
Who it's for
Data and analytics teams who need to export Snowflake query results to Amazon S3 on a schedule.
How teams use this
Export department data on a schedule
Run the Snowflake query every night to pull the latest department records and land them in S3 for the analytics team to access the next morning.
Archive Snowflake tables to S3
Use this automation to back up critical Snowflake tables to Amazon S3 on a recurring basis so historical data is preserved outside the data warehouse.
Filter results before uploading to S3
Add a condition to the query so only rows that meet specific criteria are exported to Amazon S3, reducing file size and storage costs.
Share data with external teams via S3
Export Snowflake department data to a shared S3 bucket so partner teams and vendors can download the files without direct database access.
How it works
- Run scheduled query in Snowflake. A custom SQL query executes on a schedule in Snowflake to identify the rows that need to be exported.
- Select rows from the department table. Query the PUBLIC.DEPT table in Snowflake to retrieve the batch of rows that match the scheduled query criteria for export.
- Organize query results into a list. Process the Snowflake rows into a structured list format that can be converted into a file for upload to Amazon S3.
- Upload file to Amazon S3 bucket. Write the file contents to an Amazon S3 bucket so the data is available for downstream reporting and analysis.