{"playbook":"Data engineering","url":"https://agentwranglers.se/playbook/data-engineering","updated":"2026-10-27","license":"https://creativecommons.org/licenses/by/4.0/","credit":"Required by the licence: credit Agent Wranglers with a link to the rule or playbook you used.","ids":"Each rule has an id, such as PAY-14, that never changes. Open a rule by its id at /r/PAY-14. Its revision changes whenever its content changes.","how":"Each rule's How and Measured text is on its own page: add .md to its url.","rules":[{"id":"DEN-1","revision":"60b7e312864f","updated":"2026-10-27","name":"Keep heavy reads off the production database","level":"Required","risk":"outage","stack":["postgres"],"rule":"Run reports, exports, dashboards and analysis against a warehouse or a read replica, never against the primary database the app writes to.","check":"The users on the primary database include no BI tool, notebook or analyst account, and the reporting role can connect only to the replica host. A listing of sessions on the primary over 7 days shows none from a reporting tool. The 20 queries with the most total time on the primary include no report or export query.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/separate-warehouse","related":["/playbook/data/caches-and-copies/replica-lag","/playbook/data/caches-and-copies/source-of-truth","/playbook/data/operations/query-timeouts"],"sources":["https://www.postgresql.org/docs/current/hot-standby.html"]},{"id":"DEN-2","revision":"b28fbe2399b2","updated":"2026-10-22","name":"Land raw data unchanged and build tables in layers","level":"Recommended","rule":"Load source data into a raw layer exactly as it arrived, then build cleaned and business tables from it in code. Only the loader writes to the raw layer.","check":"A script reads every model and fails when a `marts` model reads `raw` directly. Only the loader's account can write to `raw`. Rebuilding every model from raw on staging gives the same row counts as production.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/raw-then-models","related":["/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-retention","/playbook/data-engineering/warehouse-and-models/warehouse-restore"],"sources":["https://docs.getdbt.com/best-practices/how-we-structure/1-guide-overview"]},{"id":"DEN-3","revision":"b4df3f609847","updated":"2026-10-27","name":"Build every warehouse table from reviewed code","level":"Recommended","rule":"Write every table the warehouse builds as SQL or code in version control, reviewed and deployed by CI. No shared table is built from a saved query in a BI tool or a notebook.","check":"A script compares the warehouse's list of shared tables with the model files in the repository and fails on any table without a model. Only the deploy job's account can create tables in shared schemas.","check_type":"static","url":"https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/transformations-as-code","related":["/playbook/engineering/version-control-and-review/continuous-integration","/playbook/analytics/events-and-metrics/metric-definitions"],"sources":[]},{"id":"DEN-4","revision":"4106cdb349f2","updated":"2026-10-27","name":"Give every table an owner and a description","level":"Recommended","rule":"Record an owner team, a one-line description and a refresh schedule for every shared table, in a metadata file next to its code.","check":"A script reads the metadata and fails on any shared table without an owner, a description or a schedule. The warehouse's query history shows no shared table unread for 90 days.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/table-owners","related":["/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-minimisation","/playbook/infrastructure/cost-and-ownership/required-tags","/playbook/architecture/structure/delete-unused-code","/playbook/data-engineering/data-quality-tests/freshness-limits","/playbook/data-engineering/data-quality-tests/table-service-levels"],"sources":["https://docs.getdbt.com/reference/resource-configs/meta"]},{"id":"DEN-5","revision":"9aeb2ddd6bfc","updated":"2026-10-22","name":"Build and test models in separate schemas","level":"Recommended","rule":"Build models during development and in CI in a personal or per-branch schema, with masked data. Only the deploy job writes to the production schemas.","check":"Developer and CI accounts lack write rights on the production schemas. A listing of schemas shows none for a pull request closed more than 7 days ago.","check_type":"http","url":"https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/development-schemas","related":["/playbook/data/personal-data/masked-copies"],"sources":["https://docs.getdbt.com/docs/local/profiles.yml"]},{"id":"DEN-6","revision":"a313266a1026","updated":"2026-10-22","name":"Cap what each query and each month can cost","level":"Recommended","rule":"Set a maximum of bytes scanned or credits per query, and a monthly budget with alerts for the warehouse. Partition large tables by date and require a date filter on them.","check":"A query on a partitioned table without a date filter is refused. A test query above the per-query limit fails before it runs. The warehouse appears in the budget alerts with its owner.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/query-cost-limits","related":["/playbook/infrastructure/cost-and-ownership/budgets-for-every-account","/playbook/data-engineering/access-and-bi-tools/ai-query-access"],"sources":["https://docs.cloud.google.com/bigquery/docs/best-practices-costs"]},{"id":"DEN-33","revision":"dd9096159861","updated":"2026-10-22","name":"Rehearse restoring a dropped warehouse table","level":"Recommended","rule":"Write down how long the warehouse can bring back a dropped or overwritten table. Keep raw tables and snapshots recoverable for longer than that, and rehearse one restore every 6 months.","check":"On staging, drop a raw table and restore it from time travel or the export. Its row count matches the count before the drop. The rehearsal log shows one restore in the last 6 months.","check_type":"manual","url":"https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/warehouse-restore","related":["/playbook/data-engineering/warehouse-and-models/raw-then-models","/playbook/data/backups-and-recovery/restore-tests","/playbook/data-engineering/warehouse-and-models/open-table-formats","/playbook/data-engineering/loading-and-change-data-capture/snapshot-history"],"sources":["https://docs.cloud.google.com/bigquery/docs/time-travel"]},{"id":"DEN-38","revision":"b0bd3d0a2bb4","updated":"2026-10-27","name":"Keep lake tables in an open table format and maintain them","level":"Recommended","rule":"When warehouse data lives as files in object storage, write it through a table format such as Apache Iceberg or Delta Lake. Run its maintenance on a schedule, and set snapshot expiry no shorter than the restore window you promise.","check":"The scheduler lists a compaction job and a snapshot expiry job for every table, each with a run in the last 7 days. The expiry setting is at least the documented restore window. A query of the table's snapshots finds none older than the expiry plus 7 days.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/open-table-formats","related":["/playbook/data-engineering/warehouse-and-models/warehouse-restore","/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-erasure"],"sources":["https://iceberg.apache.org/docs/latest/maintenance/","https://iceberg.apache.org/docs/latest/spark-procedures/"]},{"id":"DEN-7","revision":"29ade9bd5797","updated":"2026-10-27","name":"Make every load safe to rerun","level":"Recommended","rule":"Write each load so that running it twice for the same window gives the same rows. Merge on the source key or replace whole partitions, never append without a key.","check":"Run each load twice for the same window on staging. The row count and a checksum of each table are the same after the first and the second run.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/loading-and-change-data-capture/idempotent-loads","related":["/playbook/api-design/reliability/idempotency-keys","/playbook/events/consuming-events/idempotent-consumers","/playbook/data-engineering/loading-and-change-data-capture/incremental-loads","/playbook/data-engineering/loading-and-change-data-capture/exactly-once-sinks","/playbook/data-engineering/lineage-and-changes/backfills"],"sources":[]},{"id":"DEN-8","revision":"90a7bb66e880","updated":"2026-10-22","name":"Load only what changed since the last run","level":"Recommended","rule":"Load only rows changed since the last successful run, by a change column or a log position. Save that position after the load commits, and re-read an overlap of at least 15 minutes.","check":"Update a source row while a load runs on staging. The next run copies the change. Stop a load before it commits. The saved position stays where it was.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/loading-and-change-data-capture/incremental-loads","related":["/playbook/data-engineering/loading-and-change-data-capture/idempotent-loads","/playbook/data-engineering/loading-and-change-data-capture/propagate-deletes"],"sources":[]},{"id":"DEN-9","revision":"3eb1a97a8b05","updated":"2026-10-22","name":"Carry deletes into the warehouse","level":"Required","risk":"law","rule":"Copy deletes from every source into the warehouse, along with inserts and updates. Within 24 hours of a delete in the source, the row and every row built from it are gone.","check":"Delete a test customer in the source. Within 24 hours, no raw, staging or mart table holds its ID.","check_type":"manual","url":"https://agentwranglers.se/playbook/data-engineering/loading-and-change-data-capture/propagate-deletes","related":["/playbook/data-engineering/loading-and-change-data-capture/incremental-loads","/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-erasure","/playbook/data/personal-data/retention-jobs"],"sources":["https://eur-lex.europa.eu/eli/reg/2016/679/oj"]},{"id":"DEN-13","revision":"560f16846187","updated":"2026-10-22","name":"Run pipeline steps by their dependencies","level":"Recommended","rule":"Start each step when the steps it reads from have finished, not at a fixed clock time. Retry a failed step at most 3 times, then stop the steps after it and alert.","check":"Make one load step fail on staging. No step that reads from it runs, and an alert reaches the owner within 15 minutes. Pause the scheduler past one run, and the heartbeat alert fires.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/loading-and-change-data-capture/pipeline-dependencies","related":["/playbook/operations/alerts-and-on-call/job-heartbeats","/playbook/data-engineering/data-quality-tests/freshness-limits"],"sources":["https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/tasks.html"]},{"id":"DEN-34","revision":"9adac1c22812","updated":"2026-10-22","name":"Keep the history of changing values with snapshots","level":"Recommended","rule":"For source columns that the app overwrites and reports need as they were, such as a customer's plan, take a snapshot on every load. Keep each version with the time it became valid and the time it stopped.","check":"Change a test customer's plan in the staging source and run the load. The snapshot holds two rows for that customer whose periods do not overlap, and exactly one is current. A model test fails on any key with two current rows.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/loading-and-change-data-capture/snapshot-history","related":["/playbook/data-engineering/warehouse-and-models/warehouse-restore","/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-erasure","/playbook/data/schema-design/row-history"],"sources":["https://docs.getdbt.com/docs/build/snapshots"]},{"id":"DEN-39","revision":"d70f46484f9b","updated":"2026-10-27","name":"Commit stream offsets in the same transaction as the data","level":"Recommended","rule":"A pipeline that reads a stream writes each batch and the stream position it reached in one transaction. On restart it reads the position from the target, so no event is lost or counted twice.","check":"On staging, kill the consumer after it writes a batch and before any other step, then restart it. The target's row count equals the number of events sent, and no event ID appears twice.","check_type":"manual","url":"https://agentwranglers.se/playbook/data-engineering/loading-and-change-data-capture/exactly-once-sinks","related":["/playbook/data-engineering/loading-and-change-data-capture/idempotent-loads","/playbook/events/background-jobs-and-queues/dead-letter-queue","/playbook/events/consuming-events/idempotent-consumers"],"sources":["https://kafka.apache.org/43/design/design/"]},{"id":"DEN-14","revision":"e21eeb329d7a","updated":"2026-10-22","name":"Test the keys and values of every model","level":"Recommended","rule":"Test that every model's key is unique and never null, that each reference finds its row, and that coded columns hold listed values. Run them on every build.","check":"A script fails on any model without a unique and a not-null test on its key. Insert a duplicate key on staging, and the build fails and names the model.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/data-quality-tests/model-tests","related":["/playbook/data/schema-design/constraints","/playbook/data-engineering/data-quality-tests/write-audit-publish","/playbook/data-engineering/data-quality-tests/model-unit-tests"],"sources":["https://docs.getdbt.com/docs/build/data-tests"]},{"id":"DEN-15","revision":"98873c1be959","updated":"2026-10-22","name":"Publish only tables that pass their tests","level":"Recommended","rule":"Build each table where no dashboard reads it, run its tests, and swap it in only when they pass. When a test fails, dashboards keep the last good version.","check":"Break a model on staging so that a blocking test fails. The dashboard still shows the previous numbers, and an alert names the failed test.","check_type":"manual","url":"https://agentwranglers.se/playbook/data-engineering/data-quality-tests/write-audit-publish","related":["/playbook/data-engineering/data-quality-tests/model-tests"],"sources":[]},{"id":"DEN-16","revision":"a67b3dd96f7a","updated":"2026-10-22","name":"Alert when data arrives late","level":"Recommended","rule":"Set a maximum age for the newest row of every source and mart table, and alert the table's owner when that age is passed.","check":"Stop a load on staging. The freshness alert fires within the table's limit plus 15 minutes. Every dashboard shows the time its data was last refreshed.","check_type":"manual","url":"https://agentwranglers.se/playbook/data-engineering/data-quality-tests/freshness-limits","related":["/playbook/data-engineering/warehouse-and-models/table-owners","/playbook/data-engineering/loading-and-change-data-capture/pipeline-dependencies","/playbook/data-engineering/data-quality-tests/table-service-levels"],"sources":["https://docs.getdbt.com/reference/resource-configs/freshness"]},{"id":"DEN-17","revision":"fe4969e13423","updated":"2026-10-27","name":"Reconcile totals with the source","level":"Recommended","rule":"Every day, compare row counts and money totals per day of data between each source and the warehouse. Alert on any difference past a written tolerance, which is zero for money.","check":"Delete one loaded row from the mart on staging. The next daily check reports the day and the difference.","check_type":"manual","url":"https://agentwranglers.se/playbook/data-engineering/data-quality-tests/source-reconciliation","related":["/playbook/analytics/events-and-metrics/server-side-business-events"],"sources":[]},{"id":"DEN-18","revision":"dcd33941a2f4","updated":"2026-10-27","name":"Alert on sudden changes in volume","level":"Recommended","rule":"Count the rows loaded per table per day. Alert when a day differs from the median of that weekday over 4 weeks by more than a written limit, such as 50 percent.","check":"Load half a day's rows into a table on staging. The alert fires and names the table, the day's count and the median.","check_type":"manual","url":"https://agentwranglers.se/playbook/data-engineering/data-quality-tests/volume-anomalies","related":["/playbook/analytics/events-and-metrics/exclude-test-traffic"],"sources":[]},{"id":"DEN-35","revision":"65f60e6fb59a","updated":"2026-10-22","name":"Unit test model logic with fixed rows","level":"Recommended","rule":"Give every model with branching logic, date math, window functions or a past bug a unit test. It feeds fixed input rows, compares the output with expected rows and runs in CI before the model is built.","check":"A script lists the models whose SQL holds `CASE`, a window function or date arithmetic, and fails on any without a unit test. Changing one branch of a tested `CASE` makes CI fail.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/data-quality-tests/model-unit-tests","related":["/playbook/data-engineering/data-quality-tests/model-tests"],"sources":["https://docs.getdbt.com/docs/build/unit-tests"]},{"id":"DEN-40","revision":"d696a96ea253","updated":"2026-10-27","name":"Publish a service level for every shared table","level":"Recommended","rule":"For each table that dashboards or other teams read, publish targets for freshness and for passing tests, measured over 28 days. Report each table against its targets every month.","check":"Every table with a reader outside its team has freshness and test targets in its metadata. A monthly report lists each such table with its measured share for the last 28 days, and the report from last month exists.","check_type":"manual","url":"https://agentwranglers.se/playbook/data-engineering/data-quality-tests/table-service-levels","related":["/playbook/data-engineering/data-quality-tests/freshness-limits","/playbook/data-engineering/warehouse-and-models/table-owners","/playbook/operations/service-levels/service-level-objectives","/playbook/operations/service-levels/error-budget"],"sources":["https://docs.getdbt.com/reference/resource-configs/freshness"]},{"id":"DEN-19","revision":"6eb85d4edaf9","updated":"2026-10-22","name":"Record lineage from the code","level":"Recommended","rule":"Generate lineage from the pipeline code and its run logs, from each source column to each dashboard. Never draw it by hand.","check":"Pick one personal column in a source. The lineage graph lists every table and dashboard that reads it. A search of the model code finds no reader of that column missing from the list.","check_type":"static","url":"https://agentwranglers.se/playbook/data-engineering/lineage-and-changes/lineage-from-code","related":["/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-erasure","/playbook/compliance/records-and-data-map/data-map","/playbook/data-engineering/lineage-and-changes/impact-check"],"sources":["https://openlineage.io/docs/"]},{"id":"DEN-20","revision":"a55041c47346","updated":"2026-10-22","name":"Check what a change breaks before merging","level":"Recommended","rule":"In CI, build each changed model and every model downstream of it, and run their tests. List the dashboards that read them in the pull request.","check":"Rename a column that a dashboard reads in a test pull request. CI fails, or it posts the dashboard's name in the pull request.","check_type":"http","url":"https://agentwranglers.se/playbook/data-engineering/lineage-and-changes/impact-check","related":["/playbook/data-engineering/lineage-and-changes/lineage-from-code"],"sources":["https://docs.getdbt.com/reference/node-selection/graph-operators"]},{"id":"DEN-21","revision":"7a637abe5136","updated":"2026-10-22","name":"Give notice before removing a column people use","level":"Recommended","rule":"Treat the tables that dashboards and other teams read as a public interface. Add columns freely, but keep a renamed or removed column for at least 30 days after notice.","check":"A script compares the mart schemas with the main branch and fails when a column disappears without a deprecation entry at least 30 days old.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/lineage-and-changes/deprecation-notice","related":["/playbook/api-design/changes-over-time/versioning","/playbook/data/migrations/expand-and-contract","/playbook/data-engineering/lineage-and-changes/output-contracts"],"sources":["https://docs.getdbt.com/docs/mesh/govern/model-versions"]},{"id":"DEN-22","revision":"21cac9a9ec7a","updated":"2026-10-22","name":"Backfill with the same code and record it","level":"Recommended","rule":"Rebuild past data by running the normal pipeline for each past window, a day or a week at a time. Log every backfill with its reason, window and result.","check":"A backfill of 3 days on staging gives the same rows as the daily runs gave for those days. Every production backfill has a log entry with a reason, a window and a result.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/lineage-and-changes/backfills","related":["/playbook/data-engineering/loading-and-change-data-capture/idempotent-loads","/playbook/data/migrations/data-fixes"],"sources":["https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/backfill.html"]},{"id":"DEN-41","revision":"a9b4c5e5f32d","updated":"2026-10-27","name":"Enforce a contract on every table other teams read","level":"Recommended","rule":"Declare the column names and types of each table other teams or tools read, and fail the build when the table no longer matches. A breaking change ships as a new version beside the old one.","check":"Every table marked as shared in its metadata has an enforced contract. In CI, a change that renames a column of a contracted table fails the build, and a change that adds a column passes.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/lineage-and-changes/output-contracts","related":["/playbook/data-engineering/lineage-and-changes/deprecation-notice","/playbook/events/contracts-and-schemas/source-schema-contracts"],"sources":["https://docs.getdbt.com/docs/mesh/govern/model-contracts"]},{"id":"DEN-23","revision":"7341308f6b8f","updated":"2026-10-22","name":"Copy only the personal columns an analysis needs","level":"Required","risk":"law","applies":["eu-users"],"rule":"Load a personal data column into the warehouse only when a named analysis needs it, and record that purpose. Pick columns from an allow list at extraction, so every other column stays out.","check":"A script compares the columns in the raw layer with the allow list and fails on any extra column. Every personal column in the warehouse has a purpose in its metadata.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-minimisation","related":["/playbook/data-engineering/warehouse-and-models/table-owners","/playbook/data/personal-data/minimal-columns","/playbook/compliance/records-and-data-map/data-map","/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-in-data-map","/playbook/data-engineering/personal-data-in-the-warehouse/reverse-sync-objections","/playbook/data-engineering/access-and-bi-tools/column-masking"],"sources":["https://eur-lex.europa.eu/eli/reg/2016/679/oj"]},{"id":"DEN-24","revision":"ed9f9e4ca3e5","updated":"2026-10-27","name":"Swap direct identifiers for keyed pseudonyms","level":"Recommended","rule":"Replace email addresses, names and account IDs with a keyed hash before they reach the warehouse, and keep the key outside it. Analysts join tables on the pseudonym.","check":"A query over every text column in the warehouse finds no value containing `@` and no account ID as stored in the app. The key exists in the key service and in no warehouse table or pipeline setting.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-pseudonyms","related":["/playbook/application-security/cryptography-and-keys/key-management","/playbook/data/personal-data/access-logging","/playbook/analytics/privacy-and-consent/events-without-personal-data"],"sources":["https://eur-lex.europa.eu/eli/reg/2016/679/oj","https://www.edpb.europa.eu/public-consultations/guidelines-012025-on-pseudonymisation_en"]},{"id":"DEN-25","revision":"dd79b6130738","updated":"2026-10-22","name":"Erase people from the warehouse within the month","level":"Required","risk":"law","applies":["eu-users"],"rule":"Remove each erased person from every warehouse table, snapshot, extract and BI cache within the month set in [Let people see and delete their data](https://agentwranglers.se/playbook/website/privacy/data-requests).","check":"Erase a test person with rows in every source. Within 30 days, a search of every warehouse table, extract and BI cache finds no trace of their ID, pseudonym or email. Time travel cannot bring them back.","check_type":"static","url":"https://agentwranglers.se/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-erasure","related":["/playbook/data-engineering/warehouse-and-models/open-table-formats","/playbook/data-engineering/loading-and-change-data-capture/propagate-deletes","/playbook/data-engineering/loading-and-change-data-capture/snapshot-history","/playbook/data-engineering/lineage-and-changes/lineage-from-code","/playbook/website/privacy/data-requests","/playbook/data/personal-data/retention-jobs"],"sources":["https://eur-lex.europa.eu/eli/reg/2016/679/oj","https://www.edpb.europa.eu/news/edpb-identifies-challenges-hindering-the-full-implementation-of-the-right-to-erasure_en","https://docs.cloud.google.com/bigquery/docs/time-travel"]},{"id":"DEN-26","revision":"06bca372ba23","updated":"2026-10-27","name":"Expire warehouse data by partition","level":"Recommended","rule":"Set an expiry on every table or partition that holds personal data, taken from the retention schedule. Let the warehouse drop expired partitions by itself.","check":"A script lists every warehouse table with personal columns and fails on any without an expiry that matches the schedule. No partition is older than its expiry plus one day.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-retention","related":["/playbook/data-engineering/warehouse-and-models/raw-then-models","/playbook/compliance/records-and-data-map/retention-schedule","/playbook/analytics/privacy-and-consent/analytics-retention"],"sources":["https://docs.cloud.google.com/bigquery/docs/managing-partitioned-tables"]},{"id":"DEN-27","revision":"3aa6a7c1f2e8","updated":"2026-10-22","name":"List the warehouse and every BI tool in the data map","level":"Recommended","applies":["eu-users"],"rule":"Record the warehouse, each pipeline service and each BI tool in the data map, with its region, owner and the personal columns it holds.","check":"Every warehouse, pipeline and BI account in the billing records appears in the data map, with a region and an agreement on file.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-in-data-map","related":["/playbook/compliance/processors-and-transfers/vendor-register","/playbook/compliance/processors-and-transfers/transfer-basis","/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-minimisation"],"sources":["https://eur-lex.europa.eu/eli/reg/2016/679/oj"]},{"id":"DEN-36","revision":"7ff120c7be50","updated":"2026-10-27","name":"Remove people who objected from every sync out of the warehouse","level":"Required","risk":"law","applies":["eu-users"],"rule":"Every sync that copies people from the warehouse into a marketing, advertising or sales tool drops those who objected or withdrew consent, on every run. It also removes them from audiences it filled before.","check":"Mark a test person as objected in the staging app and run the sync. They are gone from the target audience. A run that would change more rows than the limit stops and alerts.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/personal-data-in-the-warehouse/reverse-sync-objections","related":["/playbook/analytics/privacy-and-consent/analytics-consent","/playbook/email/unsubscribe/unsubscribe-lifetime","/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-minimisation","/playbook/data-engineering/access-and-bi-tools/tool-service-accounts"],"sources":["https://eur-lex.europa.eu/eli/reg/2016/679/oj"]},{"id":"DEN-28","revision":"dc348c0d123a","updated":"2026-10-22","name":"Grant warehouse access by role from the directory","level":"Recommended","rule":"Give people access to the warehouse and BI tools through roles kept in code and synced from the company directory. Grant nothing to a single person on a single table.","check":"A listing of warehouse grants shows no grant to a single user. Disable a test user in the directory. Within an hour, they can sign in to neither the warehouse nor the BI tool.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/access-and-bi-tools/warehouse-roles","related":["/playbook/infrastructure/identity-and-access/single-sign-on-for-people","/playbook/compliance/audit-logs-and-access/offboarding-within-a-day","/playbook/compliance/audit-logs-and-access/roles-as-code","/playbook/compliance/audit-logs-and-access/access-reviews"],"sources":["https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final"]},{"id":"DEN-29","revision":"d8366d0757f4","updated":"2026-10-22","name":"Mask personal columns for everyone outside a named role","level":"Required","risk":"data","rule":"Tag every personal column in the warehouse. Mask or hide tagged columns from every role except the few named for them.","check":"Sign in with the analyst role and select a tagged column. The result is masked or refused. A script fails on any personal column in the metadata that has no tag in the warehouse.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/access-and-bi-tools/column-masking","related":["/playbook/data-engineering/personal-data-in-the-warehouse/warehouse-minimisation","/playbook/data/personal-data/access-logging","/playbook/data-engineering/access-and-bi-tools/ai-query-access"],"sources":["https://eur-lex.europa.eu/eli/reg/2016/679/oj"]},{"id":"DEN-30","revision":"2715169aa476","updated":"2026-10-27","name":"Give each pipeline and BI tool its own narrow account","level":"Required","risk":"data","rule":"Give each loader, transformation job and BI tool a separate account that reaches only its own schemas. BI tools get read access to the marts and nothing else.","check":"The list of warehouse accounts holds one per tool. With the BI tool's account, any write fails, and any read from a raw or staging schema fails.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/access-and-bi-tools/tool-service-accounts","related":["/playbook/data-engineering/personal-data-in-the-warehouse/reverse-sync-objections","/playbook/infrastructure/configuration-and-secrets/workload-identity","/playbook/infrastructure/identity-and-access/least-privilege-roles","/playbook/data/database-security/app-database-role"],"sources":["https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final"]},{"id":"DEN-31","revision":"5f44bca480f3","updated":"2026-10-27","name":"Filter shared dashboards by customer inside the warehouse","level":"Required","risk":"data","rule":"When customers see dashboards built on shared tables, filter rows by customer in the warehouse or in a signed embed token. Never rely on a filter set in the dashboard alone.","check":"Open an embedded dashboard as customer A, then change the customer ID to B's in the address and in the data request. No row of B's appears.","check_type":"http","url":"https://agentwranglers.se/playbook/data-engineering/access-and-bi-tools/dashboard-row-security","related":["/playbook/data/multi-tenancy/tenant-scoped-storage","/playbook/data/multi-tenancy/tenant-isolation","/playbook/search/access-and-limits/search-access-filter","/playbook/data-engineering/access-and-bi-tools/ai-query-access"],"sources":["https://www.postgresql.org/docs/current/ddl-rowsecurity.html","https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html"]},{"id":"DEN-32","revision":"d8489b198803","updated":"2026-10-22","name":"Limit exports and public links from BI tools","level":"Recommended","rule":"Turn off public dashboard links and scheduled reports to addresses outside the company's domains in every BI tool. Allow raw exports of personal columns only to the roles that may see them.","check":"As an analyst, try to create a public link and to schedule a report to an outside address. Both are refused. The tool's admin settings show both turned off.","check_type":"command","url":"https://agentwranglers.se/playbook/data-engineering/access-and-bi-tools/bi-sharing-limits","related":["/playbook/infrastructure/identity-and-access/block-external-sharing"],"sources":[]},{"id":"DEN-37","revision":"3b736d1ebbf1","updated":"2026-10-22","name":"Run an AI assistant's warehouse queries with the asking person's access","level":"Recommended","rule":"An AI assistant that writes and runs warehouse queries does so read-only, with the row filters and column masks of the person asking. Each of its queries has a cost cap.","check":"As a person outside the finance role, ask the assistant for salaries. The answer holds only masked values. Ask it to drop a table, and the warehouse refuses the statement.","check_type":"manual","url":"https://agentwranglers.se/playbook/data-engineering/access-and-bi-tools/ai-query-access","related":["/playbook/adversarial-testing/ai-agents-and-models/file-prompt-injection","/playbook/data-engineering/access-and-bi-tools/column-masking","/playbook/data-engineering/access-and-bi-tools/dashboard-row-security","/playbook/data-engineering/warehouse-and-models/query-cost-limits"],"sources":["https://genai.owasp.org/llmrisk/llm062025-excessive-agency/"]}]}