Skip to content

is_nothing_asset_name

kedro_dagster.utils.is_nothing_asset_name(catalog, dataset_name)

Return True if the catalog entry is a DagsterNothingDataset.

Parameters

Name Type Description Default
catalog CatalogProtocol

Kedro DataCatalog or mapping-like object.

required
dataset_name str

Kedro dataset name.

required

Returns

Type Description
bool

True if the dataset is a DagsterNothingDataset.

See Also

kedro_dagster.datasets.DagsterNothingDataset : Sentinel dataset type for Dagster Nothing assets.

Source Code

Show/Hide source
def is_nothing_asset_name(catalog: "CatalogProtocol", dataset_name: str) -> bool:
    """Return True if the catalog entry is a DagsterNothingDataset.

    Parameters
    ----------
    catalog : CatalogProtocol
        Kedro DataCatalog or mapping-like object.
    dataset_name : str
        Kedro dataset name.

    Returns
    -------
    bool
        ``True`` if the dataset is a ``DagsterNothingDataset``.

    See Also
    --------
    `kedro_dagster.datasets.DagsterNothingDataset` :
        Sentinel dataset type for Dagster Nothing assets.
    """
    dataset = get_dataset_from_catalog(catalog, dataset_name)
    return isinstance(dataset, DagsterNothingDataset)