Sync local files to Snowflake via Azure Storage daily

Recipe ToolsMarketingDocument/FileDatabase

What it does

When a scheduled trigger fires every 24 hours, this automation executes a script to load a local file to Azure Blob Storage. The file is then copied into Snowflake, and the job stops with an error if the file is not found.

Who it's for

Data and analytics teams who need to move on-prem files to Snowflake on a daily schedule without manual intervention.

How teams use this

Load daily data files to Snowflake

Run the file transfer and load every 24 hours so fresh data is always in Snowflake without someone having to manually copy files. The team gets consistent, up-to-date analytics.

Alert when the file is missing

Add a notification step so someone gets alerted if the on-prem file is not found during the scan. The job stops and the team knows to investigate the source.

Load multiple files on different schedules

Set up separate automations for different files with their own schedules so some files sync hourly and others daily. Each file moves to Snowflake on its own cadence.

Archive files after successful load

Add a step to move the file to an archive folder after it loads into Snowflake so the on-prem folder stays clean. Only new files are processed on the next run.

How it works

  1. Trigger every 24 hours. This automation runs on a daily schedule to load and sync files automatically to Azure and Snowflake.
  2. Execute the load script. Run the Load File to Azure Blob Storage script on the on-prem system to move the file to cloud storage.
  3. List files in the on-prem folder. Scan the on-prem folder to find all files and check if the target file exists before proceeding to Snowflake.
  4. Copy file into Snowflake. Load the file from Azure Blob Storage into Snowflake so the data is available for analytics and reporting.
  5. Stop job if file not found. End the automation with an error if the expected file does not exist in the on-prem folder during the scan.