Jacob Ukokobili
01/21/2025, 2:01 PMversion: 1
default_environment: dev
project_id: 751cca76-711b-46ec-8e5c-26afb7f94623
environments:
- name: dev
- name: staging
- name: prod
plugins:
extractors:
- name: tap-mysql
variant: transferwise
pip_url: git+<https://github.com/transferwise/pipelinewise.git#subdirectory=singer-connectors/tap-mysql>
config:
database: ${TAP_MYSQL_DATABASE}
user: ${TAP_MYSQL_USER}
port: ${TAP_MYSQL_PORT}
host: ${TAP_MYSQL_HOST}
select:
'*.*': true # Select all tables by default
metadata:
'*.*':
replication-method: INCREMENTAL # Use INCREMENTAL replication for all tables
replication_key: update_time # Replace with your timestamp column
key_properties:
- id # Replace with your primary key column
'*.*_audit':
selected: false # Exclude tables ending with "_audit"
loaders:
- name: target-bigquery
variant: z3z1ma
pip_url: git+<https://github.com/z3z1ma/target-bigquery.git>
config:
dataset: ${TARGET_BIGQUERY_DATASET}
location: ${TARGET_BIGQUERY_LOCATION}
project: ${TARGET_BIGQUERY_PROJECT}
credentials_json: ${TARGET_BIGQUERY_CREDENTIALS_JSON}
Reuben (Matatika)
01/21/2025, 2:17 PMdatabase: ${TAP_MYSQL_DATABASE}
user: ${TAP_MYSQL_USER}
port: ${TAP_MYSQL_PORT}
host: ${TAP_MYSQL_HOST}
and here
dataset: ${TARGET_BIGQUERY_DATASET}
location: ${TARGET_BIGQUERY_LOCATION}
project: ${TARGET_BIGQUERY_PROJECT}
credentials_json: ${TARGET_BIGQUERY_CREDENTIALS_JSON}
You don't actually need to do this as Meltano automatically understands config from env vars in the format you are already providing (i.e. <PLUGIN_NAME>_<SETTING_NAME>
). So you can remove the config
blocks for both plugins entirely if you are providing all config via env.
This
select:
'*.*': true # Select all tables by default
is not a valid selection rule, and should be
select:
- '*.*'
In fact I believe Meltano will select all streams by default, so you should be able to omit select
entirely if you want to be less explicit.
You may want to exclude _audit
post-fixed tables with select
rather than `metadata`:
select:
- '!*.*_audit'
Everything else looks good to me!Jacob Ukokobili
01/22/2025, 3:10 PMJacob Ukokobili
01/22/2025, 3:47 PM_audit
isn't working as expected. Please, I'd love you to help with this. Thanks:
version: 1
default_environment: dev
project_id: 751cca76-711b-46ec-8e5c-26afb7f94623
environments:
- name: dev
- name: staging
- name: prod
plugins:
extractors:
- name: tap-mysql
variant: transferwise
pip_url: git+<https://github.com/transferwise/pipelinewise.git#subdirectory=singer-connectors/tap-mysql>
select:
- '*.*' # Select all tables first
- '!*.*_audit' # Then exclude audit tables
metadata:
select:
'*.*': # Apply metadata to all non-excluded tables
replication-method: INCREMENTAL
replication_key: update_time
key_properties:
- id
loaders:
- name: target-bigquery
variant: z3z1ma
pip_url: git+<https://github.com/z3z1ma/target-bigquery.git>
Reuben (Matatika)
01/22/2025, 4:57 PMmeltano select tap-mysql --list --all
? Also, I think you have a new issue in that select
has appeared under metadata
- the structure in your first version was correct.Jacob Ukokobili
01/22/2025, 5:02 PMmeltano select tap-mysql --list --all
is displayed a list of excluded data points for both tables contain _audit
and not _audit
e.g
[excluded ] subject_choice_slot_audit.updated_by
[excluded ] term_cost.classroom_level_id
Jacob Ukokobili
01/22/2025, 5:03 PMselect
statement for metadata
has been corrected.Reuben (Matatika)
01/22/2025, 5:39 PM!*_audit.*
and then check the output of meltano select
again?Jacob Ukokobili
01/22/2025, 8:39 PM- '!*_audit*'
workedJacob Ukokobili
01/22/2025, 9:48 PMReuben (Matatika)
01/22/2025, 9:55 PMJacob Ukokobili
01/22/2025, 9:56 PMReuben (Matatika)
01/22/2025, 9:57 PM