sincecutoff.com
← all changes

Atlas Scripts declare data operations as code

Introduced 2026-08-02 · score 0.93

HOW TO USE IT

For a backfill or purge, declare an Atlas `loop` or `exec` script; for a report, declare a `query` script. Run it with the matching `atlas script` command, then review and test it against a dev database in CI before production use.

atlas script loop --url "<database-url>" --file "file://<script-file>" --run "<script-name>"
atlas script query --url "<database-url>" --file "file://<script-file>" --run "<script-name>" --quiet
atlas script exec --url "<database-url>" --file "file://<script-file>" --run "<script-name>"

WHY THIS HELPS

Implement backfills, GDPR purges, or reports as reviewed and tested code in CI.

REQUIREMENTS AND LIMITATIONS

  • Version: v1.3.0
  • --url: Database URL. The docs show it in each example but do not state whether it is required.
  • --file: Script file URL, shown as `file://<script-file>` in the examples. Requiredness is not stated.
  • --run: Script name to run; examples use a name or a regular expression. Requiredness is not stated.
  • --quiet: For `query`, suppresses the per-step report and prints only script output.
  • script "loop" / script "query" / script "exec" (required): Declares the script kind: batched work, reads with output masking, or transactional mutations. The docs do not state whether the kinds are mutually exclusive within one file.
  • mask.columns: Columns to mask in query output.
  • mask.method: Masking method; documented examples include `REDACT`, `PARTIAL`, `HASH`, and `REPLACE`. The docs do not state that methods are mutually exclusive.
  • mask.salt: Salt used in the documented `HASH` mask example.
  • mask.keep_right: Number of right-side characters to retain in the documented `PARTIAL` example.
  • Prerequisite: Use Atlas v1.3 or later; Atlas Scripts were introduced in v1.3.
  • Prerequisite: The docs say the script testing framework runs against a real dev database and can verify results and privileges using an `as` block for a reduced role.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card