Sync CSV files from Amazon S3 to database

Developer ToolMarketingRecipe ToolsWorkatoData ParserUtilities

What it does

When a new or updated CSV file lands in Amazon S3, this automation checks if it has been processed before. It parses the file, validates the row count, and uploads it to the database or notifies someone if it is a duplicate or too large.

Who it's for

Data and analytics teams who need to ingest CSV files from S3 without manual processing or duplicate uploads.

How teams use this

Ingest daily spend reports automatically

Upload CSV files from S3 to the database each day without manual intervention. The automation validates each file and prevents duplicate uploads from the same source.

Alert finance on oversized files

Notify the Finance team when a CSV exceeds the 10,000 row limit so they can split the file or adjust the process. The automation stops and sends an email instead of uploading.

Add file metadata to the database record

Include the upload timestamp and source folder path in the database table so the team can track file lineage. Set these fields from the S3 file properties before the upload.

How it works

  1. Detect new or updated file. Monitor Amazon S3 for a new or updated file in the bucket. The automation starts when a file arrives.
  2. Validate file type and row count. Parse the file with Csv Parser to confirm it is a CSV and check that it does not exceed 10,000 rows. Stop the job if the file is invalid or too large.
  3. Check for duplicate files. Search the Lookup Table for the same filename to see if it has been processed before. Notify someone if a duplicate is found.
  4. Upload file to database. Stream the file contents into the database table so the data is available for analytics and reporting.