Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core-api][experimental] Definitions.get_all_asset_specs, Definitions.with_reconstruction_metadata #26705

Open
wants to merge 1 commit into
base: 12-23-_core-api_experimental_execution_type
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from typing_extensions import Self

import dagster._check as check
from dagster._annotations import deprecated, experimental, public
from dagster._annotations import beta, deprecated, public
from dagster._core.definitions.asset_checks import AssetChecksDefinition
from dagster._core.definitions.asset_graph import AssetGraph
from dagster._core.definitions.asset_spec import AssetSpec
Expand Down Expand Up @@ -696,13 +696,13 @@ def merge(*def_sets: "Definitions") -> "Definitions":
)

@public
@experimental
@beta
def get_all_asset_specs(self) -> Sequence[AssetSpec]:
"""Returns an AssetSpec object for every asset contained inside the Definitions object."""
asset_graph = self.get_asset_graph()
return [asset_node.to_asset_spec() for asset_node in asset_graph.asset_nodes]

@experimental
@beta
def with_reconstruction_metadata(self, reconstruction_metadata: Mapping[str, str]) -> Self:
"""Add reconstruction metadata to the Definitions object. This is typically used to cache data
loaded from some external API that is computed during initialization of a code server.
Expand Down