<#6770 feature: add support for env var interpolat...
# meltano-repo-activity
g
#6770 feature: add support for env var interpolation in
select
blocks
Issue created by aaronsteers Feature scope Configuration (settings parsing, validation, etc.) Description Per discussion here: • #6727 (comment) In cases where the
select
clause has to name a specific database or schema, and if that database or schema name differs across environments, it would make a plugin definition more DRY if we could support dynamic
select
clauses based on env variables. Example case: environments: - name: prod env: SOURCE_DB_ID: db1_live - name: uat env: SOURCE_DB_ID: db1_uat plugins: extractors: - name: tap-mysql-db1 inherit_from: tap-mysql select: - ${SOURCE_DB_ID}-table1.* - ${SOURCE_DB_ID}-table2.* - ${SOURCE_DB_ID}-table3.* metadata: "*": replication-method: LOG_BASED Challenges Cached
catalog.json
would not be compatible across environments
A challenge with this approach is that as of now, Meltano doesn't track separate environment-specific catalog files, and with the stream name having the db hardcoded as in the above example, a catalog from one environment simply would not work on any other environment. Workaround A workaround for this challenge would be to first deliver one or more of: • #2856 • #2848 Then, the user would be informed that in order to use a dynamic catalog, we recommend disabling caching (preferred) - or else remembering to explicitly delete the cache before/after each switch between environment (much less ideal because it's prone to manual error/omission). Related: • #6757 • #2856 • #2848 • #6727 meltano/meltano