Sync batch data from Jdbc to Snowflake via S3
databaseData ParserDeveloper ToolDatabase
What it does
When a scheduled query runs in Jdbc, this automation extracts data in batches and converts each to CSV. Each CSV uploads to Amazon S3, and when the final batch arrives, all staged data bulk loads into Snowflake.
Who it's for
Data and analytics teams who move large datasets from Jdbc sources to Snowflake without manual file handling.
How teams use this
Move nightly data dumps to Snowflake
Run the scheduled query every night, batch the results, and load them into Snowflake by morning so the analytics team has fresh data without manual steps.
Load data from a different source
Point the scheduled query at another database or schema, and the same batching and Snowflake load process runs without changes to this automation.
Add data validation before load
Include a condition to check row counts or data quality in each CSV batch before the bulk load step, so bad data does not reach Snowflake.
How it works
- Run scheduled query in batches. Execute a custom SQL query in Jdbc on a schedule, returning data in batches so large datasets are processed in chunks.
- Convert batch to CSV format. Transform each batch of Jdbc results into a CSV file using Csv Parser so Amazon S3 and Snowflake can ingest the structured data.
- Upload CSV to S3 bucket. Write each CSV file to an Amazon S3 bucket by file contents, staging the data for Snowflake to read and process.
- Bulk load final batch to table. When the last batch arrives, bulk load all staged data from the S3 bucket into LARGETESTTABLE3 in the schema.