Sync compliance files from Google Cloud Storage to MySQL

Recipe ToolsMarketingWorkatoDatabaseDirectory ServicesCloud PlatformDeveloper Tool

What it does

When the clock triggers every 5 days at 09:00 AM, this automation retrieves all compliance files from Google Cloud Storage. It syncs those files to a MySQL database with pagination to capture the complete file list.

Who it's for

Data and analytics teams who need compliance files synchronized from cloud storage to a database on a regular schedule.

How teams use this

Maintain compliance file inventory

Keep a current record of all compliance files stored in Google Cloud Storage by syncing them to MySQL every 5 days. The database becomes the source of truth for file audits and reporting.

Enable compliance reporting from the database

Query the MySQL table directly for compliance file reports instead of accessing cloud storage. Teams can build dashboards and alerts on the synced data without cloud storage permissions.

Filter files by compliance category

Add a condition to only sync files matching specific naming patterns or metadata tags. This requires setting up a filter in the Google Cloud Storage list step to narrow the scope.

How it works

  1. Start the sync on schedule. This automation runs every 5 days at 09:00 AM to keep compliance files in sync between Google Cloud Storage and MySQL.
  2. Check the game market view table. Select rows from the game_market_view table in MySQL to establish the baseline for this sync.
  3. List all files with pagination. Retrieve all compliance files from Google Cloud Storage using pagination to handle large result sets across multiple requests until all objects are retrieved.
  4. Transform and store the files. Process the retrieved file objects into a format ready for the database, then update the MySQL table with the complete synced compliance file list.