Rasmus Bonnevie
03/13/2023, 3:19 PMtarget
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?owen
03/14/2023, 5:45 PMnode_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 withRasmus Bonnevie
03/15/2023, 8:37 AM