Hiya, I'm extracting data from a number of postgre...
# plugins-general
p
Hiya, I'm extracting data from a number of postgres databases into a google bigquery warehouse. I'd like to prefix the table names with the source database and reckon that I could put an environment variable in the "Table Prefix" setting in the bigquery loader plugin. Is there an environment variable that expands to the extractor database name setting that I can use? If so, what is it named?
e
Hi @par_degerman. Are you using plugin inheritance to extract from multiple databases or single plugin and switching dbs at runtime (via env vars)? In the first case, you could use the different
namespace
values and set
Copy code
settings:
  table_prefix: $MELTANO_EXTRACTOR_NAMESPACE
In the second scenario, you could try
Copy code
settings:
  table_prefix: $MELTANO_EXTRACT_<SETTING_NAME>  # e.g. MELTANO_EXTRACT_DBNAME
There's a bit more info here https://www.meltano.com/docs/integration.html#extractor-variables