batch-update command applies field values from a CSV or JSON file to all records matching an encoded query. Each row must include a sys_id column to identify the target record.Batch-update records matching a query.
batch-update command applies field values from a CSV or JSON file to all records matching an encoded query. Each row must include a sys_id column to identify the target record.sn batch-update <table> <query> <file> [--dry-run] Batch-update records matching a query.
| Name | Required | Description |
|---|---|---|
| table | Yes | The table to update. |
| query | Yes | Encoded query to filter target records. |
| file | Yes | Path to a .csv or .json file with field values. |
| Flag | Default | Description |
|---|---|---|
| --dry-run | — | Preview changes without applying them. |
sn batch-update cmdb_ci_server "environment=production" updates.csv