Skip to content

Commit

Permalink
[core-apis][experimental] Definitions.get_all_asset_specs, Definition…
Browse files Browse the repository at this point in the history
…s.with_reconstruction_metadata
  • Loading branch information
OwenKephart committed Dec 23, 2024
1 parent 042185a commit 991c6c0
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 991c6c0

Please sign in to comment.