Saul Burgos
02/23/2023, 7:45 PMclaire
02/23/2023, 9:33 PMRepositoryData
is an abstract base class, does the subclass have the assets definitions you need? The default subclass is CachingRepositoryData
, which has a get_assets_defs_by_key()
methodSaul Burgos
02/23/2023, 9:35 PMSaul Burgos
02/23/2023, 9:35 PMSaul Burgos
02/23/2023, 9:40 PMclaire
02/23/2023, 9:41 PMSaul Burgos
02/23/2023, 9:44 PMSaul Burgos
02/28/2023, 3:41 PMclaire
02/28/2023, 5:18 PMowen
02/28/2023, 5:25 PMSaul Burgos
02/28/2023, 5:39 PMowen
02/28/2023, 5:46 PMRepositoryData
base class has a get_assets_defs_by_key
function, which probably should be called in that load_all_definitions
call, but isn't. So you should be able to implement that method (and maybe override load_all_definitions to call it)Saul Burgos
02/28/2023, 8:10 PMowen
02/28/2023, 11:57 PM111111
is only printed a single time) might be related to this issue: https://github.com/dagster-io/dagster/issues/12581. As for why the asset isn't showing up, I think this is due to a quirk in how we forward the asset information to dagit. In particular, any asset needs to be part of at least one job to show up. When using the default CachingRepositoryData object, we do this for you automatically (we build some jobs implicitly so that all assets are covered). Similarly (I believe you'll run into this soon), once you start using define_asset_job
, those will need to be resolved into regular JobDefinitions and returned from get_all_jobs()
.
You can see the full implementation of how the default CachingRepositoryData does all of that resolution here: https://sourcegraph.com/github.com/dagster-io/dagster/-/blob/python_modules/dagster/[…]tory_definition/repository_data_builder.py?L37:5&subtree=true, but the most important parts are centered around calling unresolved_asset_job.resolve() and get_base_asset_jobs().
Certainly going to be a bit of an adventure to get working (blobl grimace) but should be doable -- definitely let me know if you run into roadblocks.