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

Michael Dombrowski

12/01/2022, 1:25 PM
What is the correct way to define external asset dependencies? Running the example from the Defining external asset dependencies section in the docs results in the attached error message when trying to materialize assets in either repository. Looks like this behavior could be related to this issue? 🤷
from dagster import AssetKey, SourceAsset, asset, repository
@asset
def repository_a_asset():
return 5
@repository
def repository_a():
return [repository_a_asset]
repository_a_source_asset = SourceAsset(key=AssetKey("repository_a_asset"))
@asset
def repository_b_asset(repository_a_asset):
return repository_a_asset + 6
@repository
def repository_b():
return [repository_b_asset, repository_a_asset]
n

nickvazz

12/01/2022, 5:57 PM
I am new to dagster myself but having scanned the docs I ran across https://docs.dagster.io/concepts/ops-jobs-graphs/graphs#graph-patterns (alias ?) which might be worth a try 🤷
c

chris

12/02/2022, 6:15 PM
you included
repository_a_asset
in both repos, instead of
repository_a_source_asset
in the latter