{
  "name": "sql-to-s3",
  "title": "Run a SQL query and write results to S3 as CSV",
  "category": "Data",
  "tags": [
    "data",
    "python"
  ],
  "version": "1.1.1",
  "date": "2026-08-18",
  "notes": "Repin python:3.13-slim on the current digest, in ./Dockerfile as well as here. Same tag, CPython 3.13.14 to 3.13.15, and Entrypoint, Cmd, User and WorkingDir are identical on both. The repin clears nothing: util-linux CVE-2026-53615 is on the new bytes too. What it buys is a record that holds, because an OS baseline covers a pin only while that pin is its tag's head, and this one had fallen behind. pip also moves 26.1.2 to 26.2.1, which ships an SBOM of its vendored tree, so trivy now reports the msgpack and setuptools the old pin already vendored without declaring; both are recorded in hack/image-cve-exceptions.txt. This is the one item that runs pip, and it runs it with --no-cache-dir, which is the cache msgpack serialises. psycopg2-binary 2.9.12 and boto3 1.43.68 both resolve to wheels on this interpreter, so no sdist build runs either.",
  "latest": false,
  "installable": false,
  "url": "https://catalog.dagweave.com/api/v1/items/sql-to-s3/1.1.1.json",
  "entrypoint": "export",
  "parameters": [
    {
      "name": "bucket",
      "title": "Bucket",
      "description": "Target S3 bucket for the CSV result (no s3:// prefix).",
      "type": "string",
      "required": true,
      "example": "my-data-bucket"
    },
    {
      "name": "key",
      "title": "Object key",
      "description": "Destination object key for the CSV result.",
      "type": "string",
      "required": true,
      "example": "exports/users.csv"
    },
    {
      "name": "query",
      "title": "SQL query",
      "description": "SQL query to run against the Postgres database.",
      "type": "string",
      "required": true,
      "example": "SELECT id, email FROM users WHERE active"
    },
    {
      "name": "aws-access-key-id-key",
      "title": "Access key id secret key",
      "description": "Key within the Secret that holds the AWS access key id.",
      "type": "string",
      "required": false,
      "default": "access-key-id"
    },
    {
      "name": "aws-secret-access-key-key",
      "title": "Secret access key secret key",
      "description": "Key within the Secret that holds the AWS secret access key.",
      "type": "string",
      "required": false,
      "default": "secret-access-key"
    },
    {
      "name": "aws-secret-name",
      "title": "AWS secret name",
      "description": "Name of the Kubernetes Secret in the run namespace holding the AWS credentials.",
      "type": "string",
      "required": false,
      "default": "aws-credentials"
    },
    {
      "name": "db-secret-key",
      "title": "DB secret key",
      "description": "Key within the Secret that holds the Postgres connection string.",
      "type": "string",
      "required": false,
      "default": "connection-string"
    },
    {
      "name": "db-secret-name",
      "title": "DB secret name",
      "description": "Name of the Kubernetes Secret holding the Postgres connection string (DSN / libpq URL).",
      "type": "string",
      "required": false,
      "default": "postgres-credentials"
    },
    {
      "name": "region",
      "title": "AWS region",
      "description": "AWS region of the bucket.",
      "type": "string",
      "required": false,
      "default": "us-east-1"
    }
  ],
  "images": [
    {
      "ref": "python@sha256:94d3426f1def7db4a106a232ac121bfd975393e5dfd40a619b955fae45fe7913",
      "repository": "python",
      "digest": "sha256:94d3426f1def7db4a106a232ac121bfd975393e5dfd40a619b955fae45fe7913"
    }
  ],
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/sql-to-s3",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
