Rob Norman
07/22/2025, 2:46 PMversion: 1
default_environment: dev
project_id: demo-project
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:
<db config with database=testdb>
select:
- testdb-TABLE_A.*
- testdb-TABLE_B.*
loaders:
- name: target-postgres
variant: meltanolabs
pip_url: git+<https://github.com/MeltanoLabs/target-postgres.git>
config:
<db config>
mappers:
- name: meltano-map-transformer
variant: meltano
pip_url: meltano-map-transform
mappings:
- name: demo-mapping
config:
stream_maps:
testdb-TABLE_A:
__alias__: table_a
stagingdb-TABLE_A:
__alias__: table_a
proddb-TABLE_A:
__alias__: table_a
testdb-TABLE_B:
__alias__: table_b
stagingdb-TABLE_B:
__alias__: table_b
proddb-TABLE_B:
__alias__: table_b
Is there any way to "rename" or "alias" the select so that I don't have to have the database name everywhere?Reuben (Matatika)
07/22/2025, 4:15 PMconfig:
stream_maps:
"*-TABLE_A":
__alias__: table_a
"*-TABLE_B":
__alias__: table_b
or if you wanna get really fancy:
config:
stream_maps:
"*":
__alias__: "__stream_name__.rsplit('-', 1)[-1].lower()" # testdb-TABLE_A -> table_a
https://sdk.meltano.com/en/latest/stream_maps.html#aliasing-two-or-more-streams