when I use `target` when configuring the CLI resou...
# integration-dbt
r
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
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
@owen ah, that's an excellent tip that I can access the runtime manifest! Thanks 🙂