create_derived_dataset#

nominal.experimental.compute_as_code.create_derived_dataset(client: NominalClient, name: str, spec: Dataset, *, message: str = 'Initial derived definition', description: str | None = None, labels: Sequence[str] = (), properties: Mapping[str, str | float] | None = None, markings: Sequence[Marking | str] | None = None) → DerivedDataset#

Create a derived dataset defined by a nominal.compute graph.

A derived dataset is a regular dataset whose contents are computed from a nominal.compute graph (spec) instead of ingested files. It is returned as a DerivedDataset, which is not a Dataset: look it up with NominalClient.get_dataset to read its data or attach it to an asset.

For the common case of a union of tag-filtered input datasets, nominal.experimental.derived_datasets.create_derived_dataset expresses the same thing without the compute extra, and its inputs can be edited afterwards.

Parameters:
  • client – The NominalClient to use for creating the derived dataset.

  • name – Name of the derived dataset to create.

  • spec – nominal.compute graph defining how the dataset’s contents are computed.

  • message – Commit message for the initial derived definition.

  • description – Human readable description of the dataset.

  • labels – Text labels to apply to the created dataset.

  • properties – String or numeric properties for the created derived dataset. Integers are stored as floats.

  • markings – If present, markings (or marking RIDs) applied to the dataset. Sent as part of the creation request rather than applied in a follow-up call.

Returns:

Reference to the created derived dataset in Nominal.

Raises:

TypeError – If a property value is a boolean or is not a string, integer, or float.