Hi! I am trying out the new features in version 0....
# ask-community
g
Hi! I am trying out the new features in version 0.15 and I don't understand how
ins
in the
graph
works. I want to link 2 graphs with this feature. Previously I used on assets:
ins = {'previous' : AssetIn(asset_key=AssetKey('my_key'))}
.
GraphIn
object must be passed as a parameter but it does not have a key parameter. Does anyone have an example to use this feature? thanks
c
Hi Gokry. Dagster will automatically infer the name of the inputs to the graph to be the input asset keys. So for the example you mentioned, Dagster infers the graph input to be
AssetKey('previous')
. You could also define these dependencies explicitly through the
asset_keys_by_input_name
and
asset_keys_by_output_name
arguments in `AssetsDefinition.from_graph`: https://docs.dagster.io/concepts/assets/software-defined-assets#defining-explicit-dependencies-for-graph-backed-assets
We're still actively looking to improve the ergonomics of this API. I think it makes sense to accept an
AssetIn
instead of a
GraphIn
so I'll create an issue for this
@Dagster Bot issue consider accepting AssetIn and AssetOut in graph decorator
d