Authenticate to various sources, generate reports on a schedule, and upload to AWS S3 for QuickSight visualization.
encode is a Go CLI tool that:
- Connects to data sources (PostgreSQL, MariaDB, FOLIO MetaDB, Google Sheets)
- Runs SQL queries on a cron schedule
- Saves results as CSV files locally
- Uploads to AWS S3 with cumulative manifest files for QuickSight
A YAML file encode.yaml is required. See encode.example.yaml for an example.
Define a list of connections - each is a way to authenticate to a remote service:
PostgreSQL: RequiresdsnfieldMariaDB: RequiresdsnfieldFOLIO: Requiresbase_url,tenant,username, andpasswordfieldsGoogleSheets: Requirescredentials_filefield
Each report needs:
- A reference to a connection name defined in
connections - A cron schedule for when the report will run
- Query parameters specific to the connection type
Enable S3 uploads for QuickSight integration:
enabled: Set totrueto enable S3 uploadsbucket: S3 bucket nameregion: AWS regionprefix: Path prefix for organizing filesmanifest_path: Local directory for manifest files
AWS credentials are loaded via standard AWS SDK credential chain (environment variables, AWS config files, IAM roles).