Skip to main content

6 docs tagged with "data scripts"

View all tags

Batched Loops: script loop and loop policy

Run a do body repeatedly with script loop, once per keyset or range batch, each iteration in its own transaction. Control transactions, pacing, staged ramp-up, and external HTTP calls with the loop policy block.

Data Scripts: Run Data Operations as Code

Data Scripts are a declarative language for running data operations against a database: transactional mutations, reports, and batched loops, run with atlas script exec, query, and loop, with transactions, assertions, and output masking built in.

Masking Sensitive Output

Redact result columns before they leave Atlas with mask blocks: REDACT, PARTIAL, HASH, and REPLACE methods, glob column matching, scopes, precedence, and reusable named masks.

Queries and Reports: script query

Run one or more SELECTs against a single database with script query and serialize the results as CSV or a table, bind parameters, feed one query's rows into the next, and redact sensitive columns before they leave Atlas.

Testing Data Scripts: the script command

Test Data Scripts with atlas schema test, atlas migrate test, and atlas script test: the script command loads a script file, runs the scripts matching run, asserts what a script prints with output or match, expects failures with error, and runs the scripts under a reduced role or login with the as block.

Transactional Mutations: script exec

Run a set of writes as one transactional unit with script exec: SQL guards with condition, assert, and check, automatic rollback, and reads that feed writes.