Timo
07/22/2022, 11:19 AMjamie
07/22/2022, 2:26 PMasset_job = defin_asset_job(.....)
asset_job.resolve().execute_in_process()
I haven't tested this myself yet, but i think it should work. Let me know if it doesn't and i'll help debug!jamie
07/22/2022, 6:24 PMresolve
call is unnecessary. So if you are able to update, that's the approach we recommendTimo
07/25/2022, 8:28 AMTimo
07/25/2022, 8:40 AMasset_job.ressolve(assets=[myasset], source_assets=[mysourceasset]).execute_in_process()
but I get the error that the key "foo" is not provided in the error
AssetKey(s) {'foo'} were selected, but no AssetDefinition objects supply these keys.
even though mysourceasset
definitely has this key.
BTW: I get the same error when I add the stuff in a repo and open it with dagit. I think you have to enhance your SourceAssets example in the docs with a little bit more complex example which also uses jobs, ...Timo
07/25/2022, 9:01 AMfrom dagster import AssetKey, SourceAsset, asset, define_asset_job, repository
@asset
def repository_a_asset():
return 5
job_a = define_asset_job(
name="JOBA", selection=[repository_a_asset.key.to_user_string()]
)
@repository
def repository_a():
return [job_a, repository_a_asset]
repository_a_source_asset = SourceAsset(key=repository_a_asset.key)
@asset
def repository_b_asset(repository_a_asset):
return repository_a_asset + 6
job_b = define_asset_job(
name="JOBB",
selection=[repository_b_asset.key.to_user_string()]
+ [repository_a_source_asset.key.to_user_string()],
)
@repository
def repository_b():
return [job_b, repository_b_asset, repository_a_source_asset]
Timo
07/25/2022, 9:39 AMjamie
07/25/2022, 1:38 PM