DataWriteRequest

class tracdap.api.DataWriteRequest

Request to create of update a dataset stored in the TRAC platform.

content: bytes

The content of the dataset, encoded as per the “format” field.

For client streaming requests, each message contains a chunk of the encoded dataset. Empty (i.e. zero-length) chunks can be included in the stream and will be ignored. For unary requests (createSmallDataset, updateSmallDataset) the encoded content of the dataset must be included in the request as a single blob.

format: str

Format that will be used for uploading data.

This field tells TRAC what format the data will be sent in, it must be the mime type of a supported data format. Data provided in the “content” field can then be encoded in this format.

The “format” field does not affect how TRAC stores data. Incoming data is decoded and translated into a format recognised by the underlying data platform.

priorVersion: tracdap.metadata.TagSelector | None

Prior object/tag version to use for update operations.

This field should be omitted when creating a new dataset.

schema: tracdap.metadata.SchemaDefinition | None

Specify the schema with an explicit schema definition.

If an explicit schema is supplied TRAC will save the schema as part of the DATA object, creating an embedded schema this individual dataset. All future versions of the dataset must also use an embedded schema which can either be the same schema or a compatible one, with compatibility following the rules of schema versioning (fields can be added but not removed or materially altered).

TRAC will validate incoming data to make sure it is conformant with the schema.

schemaId: tracdap.metadata.TagSelector | None

Specify the schema using an external schema definition.

If a schema ID is supplied, it must be a valid tag selector for an existing SCHEMA object. All future versions of the dataset must use either the same schema ID or a later version of the same schema object.

TRAC will look up the external schema and validate incoming data to make sure it is conformant.

tagUpdates: List[tracdap.metadata.TagUpdate]

Tag update operations to be applied.

Tag updates are applied in exactly the same way as for metadata write requests.

tenant: str

Tenant code for the requested operation, always required.