Skip to content

Commit

Permalink
apidoc for AssetOut and AssetIn (#8388)
Browse files Browse the repository at this point in the history
  • Loading branch information
sryza authored and clairelin135 committed Jun 14, 2022
1 parent 531e5da commit bc1fa3e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
15 changes: 15 additions & 0 deletions python_modules/dagster/dagster/core/asset_defs/asset_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ class AssetIn(
],
)
):
"""
Defines an asset dependency.
Attributes:
key_prefix (Optional[Union[str, Sequence[str]]]): If provided, the asset's key is the
concatenation of the key_prefix and the input name. Only one of the "key_prefix" and
"key" arguments should be provided.
key (Optional[Union[str, Sequence[str], AssetKey]]): The asset's key. Only one of the
"key_prefix" and "key" arguments should be provided.
metadata (Optional[Dict[str, Any]]): A dict of the metadata for the input.
For example, if you only need a subset of columns from an upstream table, you could
include that in metadata and the IO manager that loads the upstream table could use the
metadata to determine which columns to load.
"""

def __new__(
cls,
key: Optional[CoercibleToAssetKey] = None,
Expand Down
10 changes: 6 additions & 4 deletions python_modules/dagster/dagster/core/asset_defs/asset_out.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ class AssetOut(
)
):
"""
Args:
Defines one of the assets produced by a :py:func:`@multi_asset <multi_asset>`.
Attributes:
key_prefix (Optional[Union[str, Sequence[str]]]): If provided, the asset's key is the
concatenation of the key_prefix and the asset's name, which defaults to the name of
the decorated function. Only one of the "key_prefix" and "key" arguments should be
provided.
concatenation of the key_prefix and the asset's name. When using ``@multi_asset``, the
asset name defaults to the key of the "outs" dictionary Only one of the "key_prefix" and
"key" arguments should be provided.
key (Optional[Union[str, Sequence[str], AssetKey]]): The asset's key. Only one of the
"key_prefix" and "key" arguments should be provided.
dagster_type (Optional[Union[Type, DagsterType]]]):
Expand Down

0 comments on commit bc1fa3e

Please sign in to comment.