Hello there, I'm trying to extract data from MySQL...
# troubleshooting
p
Hello there, I'm trying to extract data from MySQL. The database contains many tables but I'm interested only in extracting one. The select option in Meltano config doesn't seem to work, though. When I use
- '*.*'
the command
meltano select tap-mysql --list
will list all tables as selected. If I change it to select only one table, nothing gets selected, eg
- test_table.*
there is nothing
Copy code
Legend:
        selected
        excluded
        automatic

Enabled patterns:
        test_table.*

Selected attributes:
Excluding tables also doesn't seem to do anything. Full config below
Copy code
version: 1
default_environment: dev
project_id: 195b9a8b-75c0-4f09-9088-fc796301e375
environments:
- name: dev
- name: staging
- name: prod
plugins:
  extractors:
  - name: tap-mysql
    variant: transferwise
    pip_url: pipelinewise-tap-mysql
    config:
      host: localhost
      port: 3306
      user: test_user
      database: test_database
      ssl: false
      filter_dbs: test_database
    select:
    - test_table.*
    metadata:
      test_table:
        selected: true
      '*':
        replication-method: INCREMENTAL
        replication-key: entity_id
Could you please help? Am I missing anything obvious?
t
The stream name returned by tap-mysql will have the schema name prepended to the table name. So your select rule needs to be something like
test_schema-test_table.*
The same will be true for the patterns in the
metadata
section
p
That was it! thanks very much, mate
t
You are welcome. 🙂