Batch Write
Write records to multiple tables in a single transaction.
Deprecated: use write_data (client.data.write), which also writes raw series and supports update and delete.
Supports:
- Batch references: Use “_ref” to label records, “@refname” to reference them
- Natural keys: Use human-readable values for foreign keys (e.g., recipe name)
- Automatic FK ordering: Tables are inserted in dependency order
- Upsert mode: Update existing records based on match columns
- Dry run: Validate without committing changes
Committed writes are recorded against a job execution (created automatically if not supplied) and the job_execution_id is returned, so the write can be reverted as a unit.
Requires an API key with the write scope.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
Map of table_name to list of records to insert.
Optional write options (mode, match_on, dry_run, return_records).
Response
Count of created/updated records per table.
Map of _ref labels to their created IDs.
Created/updated records (only if return_records=True).
Execution plan (only if dry_run=True).