{"ref":"artifact:animb1996-cds-data-drift","page":"/artifacts/animb1996-cds-data-drift","json":"/artifacts/animb1996-cds-data-drift.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"animb1996-cds-data-drift","name":"@animb1996/cds-data-drift","artifact_type":"cli","ecosystem":"cap","flavors":[{"key":"node","source":{"url":"https://registry.npmjs.org/@animb1996/cds-data-drift","title":"@animb1996/cds-data-drift — npm registry record, README","checked":"2026-09-20","quote":"The current release targets SAP CAP 9 (`@sap/cds >=9 <10`) and supports Node.js 20 or newer."}}],"domain":"developer-experience","origin_ring":"independent","description":{"one_line":"Compares the CSV files under a CAP project's `db/data` with the rows in the database bound as its `db` service, and reports where the two have diverged without writing to either.","short":"Compares a CAP project's CSV data with its database rows","what_it_solves":"Initial data in a CAP project is CSV under `db/data`, and after a few deployments nothing says whether the deployed database still matches those files. `npx cds-data-drift` reads both sides and prints the records that differ under five conditions: a key only in the CSV, a key only in the database, a key in both whose compared fields differ, a comparison key that occurs more than once, and validation errors such as an unknown entity or column. It installs as a dev dependency and is configured through a `cds.dataDrift` block in `package.json` — which folders to read, which entities to skip, which keys to compare on — and runs against whatever the project has bound, from the local database to an [SAP HANA Cloud](artifact:btp-hana-cloud) HDI container reached through `cds bind`. It stops at reporting: it issues SELECT queries only and never updates the database or rewrites a CSV, so what it finds is reconciled by hand."},"links":{"npm":"https://www.npmjs.com/package/@animb1996/cds-data-drift"},"provides":[{"capability":"capability:seed-data","what_it_does":"Checks the CSV files the core loads at deploy time against the rows in the database that was deployed from them, reporting keys present on only one side, records whose compared fields differ, and duplicate comparison keys.","sources":[{"url":"https://registry.npmjs.org/@animb1996/cds-data-drift","title":"@animb1996/cds-data-drift — npm registry record, README","checked":"2026-09-20","quote":"`@animb1996/cds-data-drift` is a read-only seed-data drift reporter for SAP CAP. It compares local `db/data` CSV records with the database configured as the CAP `db` service."}]}],"provenance":{"discovered_via":[{"source":"source:curator"}],"first_seen":"2026-09-20"},"identity":{"author":"Anim Basu","license":"Apache-2.0"},"compat":{"runtimes":["node"],"cds_range":">=9 <10"},"agent":{"source":{"url":"https://registry.npmjs.org/@animb1996/cds-data-drift","title":"@animb1996/cds-data-drift — npm registry record, README","checked":"2026-09-20"},"install":"npm install --save-dev @animb1996/cds-data-drift","config_snippet":"{\n  \"cds\": {\n    \"dataDrift\": {\n      \"folders\": [\"db/data\"],\n      \"dbService\": \"db\",\n      \"ignoreManagedColumns\": true,\n      \"emptyStringEqualsNull\": true,\n      \"excludeEntities\": [\n        \"flowmate.db.ProcessRequests\",\n        \"flowmate.db.ProcessTasks\"\n      ],\n      \"entities\": {\n        \"flowmate.db.ProcessSubTypes\": {\n          \"keys\": [\"code\"]\n        },\n        \"flowmate.ca.db.WorkflowStepConfigs\": {\n          \"keys\": [\"requestType_code\", \"requestVariant_code\", \"stepNo\"],\n          \"ignoreColumns\": [\"ID\"]\n        }\n      }\n    }\n  }\n}","minimal_example":"npx cds-data-drift\nnpx cds-data-drift --entity flowmate.db.ProcessSubTypes\nnpx cds-data-drift --format json --out data-drift.json","pitfalls":["CDS keys are used automatically when an entity does not have an explicit key configuration.","Managed fields `createdAt`, `createdBy`, `modifiedAt`, and `modifiedBy` are ignored.","Empty CSV values and database `null` are considered equal.","At most 100,000 records are read per entity by default.","Exit code 1 means drift or a validation mismatch was detected; `--warn-only` keeps it at 0."]},"maintainers":["actor:abasu1996"],"drafted_with_ai":true},"effective_normative_relations":[],"readings":{"liveness":[{"label":"Maintenance","tier":"good","evidence":"1 month since release"},{"label":"Continuity","tier":"fair","evidence":"1 publisher on npm"},{"label":"Repository","tier":"unknown","evidence":"no repository data"}],"compatibility":[{"label":"Declared for","tier":"fair","evidence":">=9 <10 — cds 9 only, in maintenance until 2027-06"},{"label":"Survived majors","tier":"unknown","evidence":"first released after @sap/cds 10 shipped"},{"label":"Maintainer's CI","tier":"unknown","evidence":"no repository data"}],"practice":[{"label":"Tests","tier":"unknown","evidence":"npm test script, tree not read"},{"label":"Docs","tier":"fair","evidence":"README 3 KB"},{"label":"Changelog","tier":"fair","evidence":"none in the repo"}],"reach":[{"value":4,"unit":"installs/week"},{"value":null,"unit":"watching"}]},"signals":{"crawled_at":"2026-10-24","latest_version":"0.1.0","majors":{"0.1":{"version":"0.1.0","date":"2026-09-19"}},"license":"Apache-2.0","first_release":"2026-09-19","last_release":"2026-09-19","releases":1,"cadence_days":null,"maintainers":1,"repository_directory":null,"peer_cds":">=9 <10","test_script":true,"types":false,"downloads_weekly":4,"npm_document_version":"0.1.0","npm_document_integrity":"sha512-2K+R89ZkqMB0VzRA8J5BvqEfgLUw8GuIk4BVO+oMSRjiKyO8qcy6bIDFRcAaVwm90TY/QBR3HnKs/CuOTG1fRw==","npm_document_tarball":"https://registry.npmjs.org/@animb1996/cds-data-drift/-/cds-data-drift-0.1.0.tgz","readme_path":"README.md","readme_bytes":3118,"readme_source":"npm","changelog":false,"license_file":false,"months_since_release":1,"dormant":false,"dependencies":1,"node_engine":">=20","downloads_monthly":39,"npm_repository":"not reachable"},"release_notes":{"license":"Apache-2.0","quotable":true,"versions":[{"version":"0.1.0","date":"2026-09-19"}],"crawled_at":"2026-10-25"},"edges":{"maintainers":[{"ref":"actor:abasu1996","name":"Anim Basu","json":"/actors/abasu1996.json"}],"contributors":[],"explained_by":[],"alternative_to_this":[],"needed_by":[],"available_via":[],"parts":[],"add_ons":[],"answered_through_parts":[]}}