Write

View as Markdown

Write records to a table.

Inserts or updates records in the specified target table. Supports batch inserts, upserts with match columns, default value functions (DATETIME_NOW, UUID4), and optional dry-run validation. A job execution is created automatically if one is not provided.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
target_namestringRequired
The name of the table to write to.
target_typeenumRequired

The type of target. Currently ‘table’ or ‘core-table’.

datalist of maps from strings to anyRequired
List of record dicts to write.
modestringRequired

Write mode (e.g. ‘create’, ‘create-or-update’).

batch_insert_okbooleanOptionalDefaults to false
If True, allow batch insert of multiple records.
params_to_match_for_updatelist of strings or nullOptional
Column names to match on when updating existing records.
defaultsmap from strings to strings or nullOptional

Map of field names to default function names (e.g. ‘DATETIME_NOW’, ‘UUID4’).

job_execution_idstring or nullOptionalformat: "uuid"
Existing job execution ID to associate with this write. If omitted, a new one is created.
job_namestring or nullOptional

Name for the auto-created job. Defaults to ‘Off-Platform Manual Job’.

collect_outputbooleanOptionalDefaults to false
If True, return the written records in the response.
dry_runbooleanOptionalDefaults to false
If True, resolve references, check table and column validity, and return the execution plan without committing changes.

Response

OK

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error