Franklin
10/20/2024, 4:39 PMtap-spreadsheets-anywhere tap and load them into separate schemas in a Postgres database with target-postgres. Here's my current configuration:
- name: tap-spreadsheets-anywhere
variant: ets
pip_url: git+<https://github.com/ets/tap-spreadsheets-anywhere.git>
config:
tables:
- path: <file://data/landing/santander/debito>
name: source1
pattern: .csv
key_properties: []
format: csv
start_date: '2024-01-01T00:00:00Z'
skip_initial: 8
field_names: [fecha, referencia, concepto, descripcion, debito, credito, saldos]
- path: <file://data/landing/itau/debito>
name: source2
pattern: .xls
key_properties: []
format: excel
worksheet_name: Estado de Cuenta
start_date: '2024-01-01T00:00:00Z'
skip_initial: 6
- path: <file://data/landing/scotia/debito>
name: source3
pattern: .csv
field_names: [suc, fecha, fecha_valor, descripcion, comprobante, debito, credito]
key_properties: []
format: csv
start_date: '2024-01-01T00:00:00Z'
skip_initial: 1
Loading Data (target-postgres):
I'm using target-postgres to load the data into my Postgres database named analytics.
Unfortunately, the current configuration loads all data into the same schema.
I'd like to modify this so each source gets loaded into a separate schema (e.g., source1, source2, source3)
- name: target-postgres
variant: meltanolabs
pip_url: meltanolabs-target-postgres
config:
add_record_metadata: true
database: analytics
user: init_loader
port: 5432
host: localhost
Could someone please advise on how to configure target-postgres to load each data source into its own dedicated schema within the Postgres database?dylan_just
10/20/2024, 8:36 PMload_schema property on the extractorAndy Carter
10/21/2024, 12:13 PMdefault_target_schema: ${MELTANO_EXTRACTOR_NAMESPACE} on your target-postgres config to get separate schemas based on the tap names.
If you want this to work with tap-spreadsheets-anywhere you might need to create a new inherited tap from the parent and rename it, so you have a tap-spreadsheets-anywhere with no config, and then tap-santander , tap-itau with one table in each.Franklin
10/21/2024, 2:40 PMFranklin
10/21/2024, 2:49 PMAndy Carter
10/21/2024, 4:19 PM