Omri Antman
04/15/2024, 12:51 PMversion: 1
default_environment: dev
environments:
- name: dev
config:
plugins:
loaders:
- name: target-snowflake
config:
database: AIRFLOW_TASKS_DEV
warehouse: dbt_dev_wh
- name: staging
- name: prod
config:
plugins:
loaders:
- name: target-snowflake
config:
database: AIRFLOW_TASKS
warehouse: dbt_wh
plugins:
- name: tap-smoke-test
variant: meltano
pip_url: git+<https://github.com/meltano/tap-smoke-test.git>
config:
streams:
- stream_name: animals
input_filename: <https://raw.githubusercontent.com/meltano/tap-smoke-test/main/demo-data/animals-data.jsonl>
loaders:
- name: target-snowflake
variant: meltanolabs
pip_url: meltanolabs-target-snowflake
config:
account: $SNOWFLAKE_ACCOUNT
user: $SNOWFLAKE_USER
role: ORCHESTRATOR_ROLE
password: $SNOWFLAKE_PASSWORD
- name: target-snowflake-test-upsert
inherit_from: target-snowflake
config:
schema: test
load_method: upsert
key_properties:
- id
Edgar Ramírez (Arch.dev)
04/15/2024, 5:21 PMOmri Antman
04/15/2024, 6:18 PMOmri Antman
04/15/2024, 6:43 PM- name: tap-smoke-test
variant: meltano
pip_url: git+<https://github.com/meltano/tap-smoke-test.git>
config:
streams:
- stream_name: animals
input_filename: <https://raw.githubusercontent.com/meltano/tap-smoke-test/main/demo-data/animals-data.jsonl>
primary_keys:
- id
Edgar Ramírez (Arch.dev)
04/15/2024, 8:44 PMI need to define the key_properties inside the extractor or loader?Inside the extractor. You can use meltano's metadata extra. Something like this ought to work:
plugins:
extractors:
- name: tap-smoke-test
variant: meltano
pip_url: git+<https://github.com/meltano/tap-smoke-test.git>
config:
schema_inference_record_count: 5
streams:
- stream_name: animals
input_filename: ./animals-data.jsonl
metadata:
animals:
key-properties: ["id"] # <- custom metadata
Omri Antman
04/16/2024, 9:15 AM