# create_derived_dataset

## nominal.experimental.compute_as_code.create_derived_dataset(client, name, spec, *, message='Initial derived definition', description=None, labels=(), properties=None, markings=None)

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`](https://dev.nominal.io/python/ref/generated/nominal.experimental.derived_datasets.DerivedDataset.md#nominal.experimental.derived_datasets.DerivedDataset "nominal.experimental.derived_datasets.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`](https://dev.nominal.io/python/ref/generated/nominal.experimental.derived_datasets.create_derived_dataset.md#nominal.experimental.derived_datasets.create_derived_dataset "nominal.experimental.derived_datasets.create_derived_dataset") expresses the same thing without the
`compute` extra, and its inputs can be edited afterwards.

Parameters:
:   - **client** ([*NominalClient*](https://dev.nominal.io/python/ref/generated/nominal.core.NominalClient.md#nominal.core.NominalClient "nominal.core.client.NominalClient"))

      The NominalClient to use for creating the derived dataset.
    - **name** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)"))

      Name of the derived dataset to create.
    - **spec** (*Dataset*)

      `nominal.compute` graph defining how the dataset’s contents are computed.
    - **message** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)"))

      Commit message for the initial derived definition.
    - **description** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* *None*)

      Human readable description of the dataset.
    - **labels** ([*Sequence*](https://docs.python.org/3/library/typing.html#typing.Sequence "(in Python v3.15)")*[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*]*)

      Text labels to apply to the created dataset.
    - **properties** ([*Mapping*](https://docs.python.org/3/library/typing.html#typing.Mapping "(in Python v3.15)")*[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*,* [*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* [*float*](https://docs.python.org/3/builtins/functions.html#float "(in Python v3.15)")*]* *|* *None*)

      String or numeric properties for the created derived dataset.
      Integers are stored as floats.
    - **markings** ([*Sequence*](https://docs.python.org/3/library/typing.html#typing.Sequence "(in Python v3.15)")*[*[*Marking*](https://dev.nominal.io/python/ref/generated/nominal.core.Marking.md#nominal.core.Marking "nominal.core.marking.Marking") *|* [*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*]* *|* *None*)

      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**](https://docs.python.org/3/builtins/exceptions.html#TypeError "(in Python v3.15)") – If a property value is a boolean or is not a string, integer, or float.

Return type:
:   [*DerivedDataset*](https://dev.nominal.io/python/ref/generated/nominal.experimental.derived_datasets.DerivedDataset.md#nominal.experimental.derived_datasets.DerivedDataset "nominal.experimental.derived_datasets._derived_datasets.DerivedDataset")
