https://dagster.io/ logo
#integration-dbt
Title
# integration-dbt
r

Rasmus Bonnevie

03/13/2023, 3:19 PM
when I use
target
when configuring the CLI resource to switch to a production target, it seems the
node_info
sent to
runtime_metadata_fn
is based on the default schema, which is annoying since I was using it to register what schema was used in materialization. Is this expected?
o

owen

03/14/2023, 5:45 PM
hi @Rasmus Bonnevie -- good point, this is definitely a bit confusing. The
node_info_to_asset_key
function relies on the fact that this
node_info
does not change between environments, because otherwise asset keys would change, which would mess up dependencies. the other
node_info_to...
arguments use the same manifest, and so are also locked to the default profile's node info. however,
runtime_metdata_fn
has the advantage of being, well, run at runtime, and so it could in theory fetch the actual manifest.json file instead of just using the one that it has from definition time. changing this default behavior might be a bit disruptive (or not!), but if you're interested, then filing a github issue would be great. in the meantime, you are able to access the dbt resource within the runtime metadata function, as one of the arguments is
context
. so
context.resources.dbt.get_manifest_json()
should give you the "real" runtime manifest file to work with
r

Rasmus Bonnevie

03/15/2023, 8:37 AM
@owen ah, that's an excellent tip that I can access the runtime manifest! Thanks 🙂
4 Views