Struggling finding the documentation on something ...
# troubleshooting
w
Struggling finding the documentation on something else. I have tap-salesforce and target-postgres. Can I use schema mapping to load the SF data into "dl_salesforce" rather than "tap_salesforce" inside of Postgres. I tried setting default_target_schema under the tap config but that didn't seem to have an effect. Also tried using schema_maping under target-postgres config but apparently am not getting the right combo there.
t
If you put the default_target_schema in the config for target-postres it'll work. 😉
w
So, if I have two taps going into one target then will default_target_schema put the tables for both into the same schema? Not the desired behavior so that is why I was trying schema_mapping
t
Correct - default_target_schema will set/replace the schema for everything, I believe. I've never tried the schema_mapping feature but that seems like it should work. Another option is to define a virtual loader using the inherit_from feature and set a different default_target_schema for each loader. That's how I handled this in our env.
a
Easiest thing I have found that does exactly what I want 1. SET
default_target_schema: ${MELTANO_EXTRACT__LOAD_SCHEMA}
in the Postges target config 2. SET
load_schema: DesiredSchemaHere
in your Tap (note this is not in config dict but rather at the same level as pip_url, name, etc)