https://dagster.io/ logo
#ask-community
Title
# ask-community
o

Oliver

08/18/2022, 10:30 PM
hello all, is there a way to propogate key_prefix to input assets? eg. I have a module that loads two assets
Copy code
@asset
def a():
   return 'a'

@asset
def b(a):
    return f'{a}b'
then I consume these like
Copy code
assets_1 = load_assets_from_package_module(
            assets_module,
            key_prefix='1'
        )

assets_2 = load_assets_from_package_module(
            assets_module,
            key_prefix='2'
        )
with this setup I get
Input asset '["a"]' for asset '["1", "b"]' is not produced
, but I would like for asset
1, b
to depend on
1,a
not just
a
s

sandy

08/19/2022, 3:44 AM
Currently there is not, though I could see the value in doing so. Would you be up for filing an issue on GitHub? Also, right now, if the assets are in the same group, then Dagster should be able to infer the dependency from the last segment of the key
o

Oliver

08/19/2022, 6:18 AM
sure 🙂 https://github.com/dagster-io/dagster/issues/9436 not sure if maybe it should actually be a bug report, thinking about it more id say that using prefix_key will always break modules with multiple assets when loading in this way?