What is the correct way to define external asset d...
# ask-community
m
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
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
you included
repository_a_asset
in both repos, instead of
repository_a_source_asset
in the latter