surya_g
05/20/2021, 1:58 PM- name: pipelinewise-tap-snowflake
#variant: transferwise
namespace: pipelinewise_tap_snowflake
pip_url: pipelinewise-tap-snowflake
executable: tap-snowflake
config: ....
couple of questions. 1. wondering why variant: transferwise doesn't work for snowflake tap like it does for loader
2. when i run meltano elt pipelinewise-tap-snowflake target-postgres it doesn't do anything saying there are no properties file. i generated properties.json but not sure how to give that to meltano.surya_g
05/20/2021, 1:59 PMmeltano | Running extract & load...
pipelinewise-tap-snowflake | /Users//code/meltano//.meltano/extractors/pipelinewise-tap-snowflake/venv/lib/python3.8/site-packages/pandas/compat/__init__.py:120: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
pipelinewise-tap-snowflake | warnings.warn(msg)
pipelinewise-tap-snowflake | time=2021-05-20 08:58:45 name=tap_snowflake level=INFO message=No properties were selected
meltano | Extract & load complete!
meltano | Transformation skipped.taylor
05/20/2021, 2:23 PMwondering whytap-snowflake isn’t discoverable out of the box like many other taps, so you need to treat it like a custom extractor.doesn’t work for snowflake tap like it does for loadervariant: transferwise
surya_g
05/20/2021, 2:40 PMsurya_g
05/20/2021, 2:41 PMtaylor
05/20/2021, 2:42 PMsurya_g
05/20/2021, 2:45 PMsurya_g
05/20/2021, 2:46 PMtaylor
05/20/2021, 2:48 PM--properties properties.jsontaylor
05/20/2021, 2:48 PMproperties is the old method for taps. --catalog is the newer way, but some taps still support the old waytaylor
05/20/2021, 2:48 PM--propertiessurya_g
05/20/2021, 2:52 PMmeltano elt pipelinewise-tap-snowflake target-postgres --properties properties.json
Error: no such option: --propertiestaylor
05/20/2021, 2:54 PMmeltano elt pipelinewise-tap-snowflake --properties properties.json target-postgrestaylor
05/20/2021, 2:54 PMtarget-postgres it’s trying to pass it to the target and not the tapsurya_g
05/20/2021, 2:58 PMmeltano elt pipelinewise-tap-snowflake --properties properties.json target-postgres
Usage: meltano elt [OPTIONS] EXTRACTOR LOADER
Try 'meltano elt --help' for help.
Error: no such option: --propertiessurya_g
05/20/2021, 2:59 PMcapabilities:
- properties
- state
catalog: properties.json
trying this in my config nowtaylor
05/20/2021, 3:02 PMmeltano invoke pipelinewise-tap-snowflake ?surya_g
05/20/2021, 3:09 PMmeltano invoke pipelinewise-tap-snowflake
[2021-05-20 10:08:19,111] [39978|MainThread|meltano.core.plugin.singer.tap] [INFO] Found catalog in /Users/code/meltano/properties.json
/Users/code/meltano/attentive/.meltano/extractors/pipelinewise-tap-snowflake/venv/lib/python3.8/site-packages/pandas/compat/__init__.py:120: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
warnings.warn(msg)
time=2021-05-20 10:08:20 name=tap_snowflake level=INFO message=Getting column information for snowflake_sample_data.tpcds_sf10tcl.CALL_CENTER...
{"type": "STATE", "value": {"currently_syncing": null}}taylor
05/20/2021, 3:10 PMsurya_g
05/20/2021, 3:11 PMmeltano invoke pipelinewise-tap-snowflake --properties properties.json
[2021-05-20 10:11:08,324] [40078|MainThread|meltano.core.plugin.singer.tap] [INFO] Found catalog in /Users/code/meltano/attentive/properties.json
{"type": "STATE", "value": {"currently_syncing": null}}taylor
05/20/2021, 3:13 PMtaylor
05/20/2021, 3:13 PMsurya_g
05/20/2021, 3:14 PMmeltano elt pipelinewise-tap-snowflake target-postgres
meltano | Running extract & load...
pipelinewise-tap-snowflake | warnings.warn(msg)
pipelinewise-tap-snowflake | time=2021-05-20 10:12:16 name=tap_snowflake level=INFO message=Getting column information for snowflake_sample_data.tpcds_sf10tcl.CALL_CENTER...
meltano | Incremental state has been updated at 2021-05-20 15:12:18.213661.
meltano | Extract & load complete!
meltano | Transformation skipped.taylor
05/20/2021, 3:14 PMsurya_g
05/20/2021, 3:14 PMsurya_g
05/20/2021, 3:15 PMcapabilities:
- properties
catalog: properties.jsonsurya_g
05/20/2021, 3:15 PMtaylor
05/20/2021, 3:17 PMsurya_g
05/20/2021, 3:17 PMschemas to that tap via meltanotaylor
05/20/2021, 3:18 PMsurya_g
05/20/2021, 3:22 PM"streams": [
{
"tap_stream_id": "SNOWFLAKE_SAMPLE_DATA-TPCDS_SF10TCL-CALL_CENTER",
"table_name": "CALL_CENTER",
"schema": {
"properties": {
"CC_CALL_CENTER_SK": {
"inclusion": "available",
"type": [
"null",
"number"
]
},surya_g
05/20/2021, 3:22 PMsurya_g
05/20/2021, 3:26 PMaaronsteers
05/20/2021, 3:43 PMsurya_g
05/20/2021, 3:45 PM- name: pipelinewise-tap-snowflake
namespace: pipelinewise_tap_snowflake
pip_url: pipelinewise-tap-snowflake
executable: tap-snowflake
capabilities:
- properties
- catalog
- discover
#catalog: properties.json
select:
- SNOWFLAKE_SAMPLE_DATA-TPCDS_SF10TCL-*
config:
"account": "mn55477.us-east-2.aws" ....
i have this in my yml
i am running this
meltano elt pipelinewise-tap-snowflake target-postgres
meltano | Running extract & load...
pipelinewise-tap-snowflake | warnings.warn(msg)
pipelinewise-tap-snowflake | time=2021-05-20 10:43:47 name=tap_snowflake level=INFO message=Getting column information for snowflake_sample_data.tpcds_sf10tcl.CALL_CENTER...
pipelinewise-tap-snowflake | time=2021-05-20 10:43:49 name=tap_snowflake level=WARNING message=There are no columns selected for stream SNOWFLAKE_SAMPLE_DATA-TPCDS_SF10TCL-CALL_CENTER, skipping it.
meltano | Incremental state has been updated at 2021-05-20 15:43:49.275806.
meltano | Extract & load complete!
meltano | Transformation skipped.surya_g
05/20/2021, 3:46 PMsurya_g
05/20/2021, 3:46 PMsurya_g
05/20/2021, 3:47 PMschemas:
- source_schema: "SCHEMA_1" # Source schema (aka. database) in Snowflake with tables
target_schema: "REPL_SCHEMA_1" # Target schema in the destination Data Warehouse
# List of tables to replicate from Snowflake to a destination
#
# Please check the Replication Strategies section in the documentation to understand the differences.
tables:
- table_name: "TABLE_ONE"
replication_method: "INCREMENTAL" # One of INCREMENTAL or FULL_TABLE
replication_key: "last_update" # Important: Incremental load always needs replication key
# OPTIONAL: Load time transformations
#transformations:
# - column: "last_name" # Column to transform
# type: "SET-NULL" # Transformation type
# You can add as many tables as you need...
- table_name: "TABLE_TWO"
replication_method: "FULL_TABLE"aaronsteers
05/20/2021, 3:48 PMaaronsteers
05/20/2021, 3:51 PMlevel=INFO message=Getting column information for snowflake_sample_data.tpcds_sf10tcl.CALL_CENTER...
pipelinewise-tap-snowflake | time=2021-05-20 10:43:49 name=tap_snowflake level=WARNING message=There are no columns selected for stream SNOWFLAKE_SAMPLE_DATA-TPCDS_SF10TCL-CALL_CENTER, skipping it.
Interesting that it finds the table but not ‘selected’ columns.
Can you try this update:
select:
- SNOWFLAKE_SAMPLE_DATA-TPCDS_SF10TCL-CALL_CENTER.*surya_g
05/20/2021, 3:57 PMsurya_g
05/20/2021, 3:57 PMmeltano elt pipelinewise-tap-snowflake target-postgres
meltano | Running extract & load...
pipelinewise-tap-snowflake | /Users/sgaddipati/code/meltano/attentive/.meltano/extractors/pipelinewise-tap-snowflake/venv/lib/python3.8/site-packages/pandas/compat/__init__.py:120: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
pipelinewise-tap-snowflake | warnings.warn(msg)
pipelinewise-tap-snowflake | time=2021-05-20 10:56:37 name=tap_snowflake level=INFO message=Getting column information for snowflake_sample_data.tpcds_sf10tcl.CALL_CENTER...
pipelinewise-tap-snowflake | time=2021-05-20 10:56:38 name=tap_snowflake level=INFO message=Beginning to sync SNOWFLAKE_SAMPLE_DATA.TPCDS_SF10TCL.CALL_CENTER
pipelinewise-tap-snowflake | time=2021-05-20 10:56:38 name=singer level=INFO message=METRIC: {"type": "timer", "metric": "job_duration", "value": 0.00010180473327636719, "tags": {"job_type": "sync_table", "database": "SNOWFLAKE_SAMPLE_DATA", "table": "CALL_CENTER", "status": "failed"}}
pipelinewise-tap-snowflake | time=2021-05-20 10:56:38 name=tap_snowflake level=CRITICAL message=Only INCREMENTAL and FULL TABLE replication methods are supported
pipelinewise-tap-snowflake | Traceback (most recent call last):
pipelinewise-tap-snowflake | File "/Users/sgaddipati/code/meltano/attentive/.meltano/extractors/pipelinewise-tap-snowflake/venv/bin/tap-snowflake", line 8, in <module>
pipelinewise-tap-snowflake | sys.exit(main())
pipelinewise-tap-snowflake | File "/Users/sgaddipati/code/meltano/attentive/.meltano/extractors/pipelinewise-tap-snowflake/venv/lib/python3.8/site-packages/tap_snowflake/__init__.py", line 500, in main
pipelinewise-tap-snowflake | raise exc
pipelinewise-tap-snowflake | File "/Users/sgaddipati/code/meltano/attentive/.meltano/extractors/pipelinewise-tap-snowflake/venv/lib/python3.8/site-packages/tap_snowflake/__init__.py", line 497, in main
pipelinewise-tap-snowflake | main_impl()
pipelinewise-tap-snowflake | File "/Users/sgaddipati/code/meltano/attentive/.meltano/extractors/pipelinewise-tap-snowflake/venv/lib/python3.8/site-packages/tap_snowflake/__init__.py", line 486, in main_impl
pipelinewise-tap-snowflake | do_sync(snowflake_conn, args.config, args.catalog, state)
pipelinewise-tap-snowflake | File "/Users/sgaddipati/code/meltano/attentive/.meltano/extractors/pipelinewise-tap-snowflake/venv/lib/python3.8/site-packages/tap_snowflake/__init__.py", line 474, in do_sync
pipelinewise-tap-snowflake | sync_streams(snowflake_conn, catalog, state)
pipelinewise-tap-snowflake | File "/Users/sgaddipati/code/meltano/attentive/.meltano/extractors/pipelinewise-tap-snowflake/venv/lib/python3.8/site-packages/tap_snowflake/__init__.py", line 466, in sync_streams
pipelinewise-tap-snowflake | raise Exception('Only INCREMENTAL and FULL TABLE replication methods are supported')
pipelinewise-tap-snowflake | Exception: Only INCREMENTAL and FULL TABLE replication methods are supported
meltano | Incremental state has been updated at 2021-05-20 15:56:38.879309.
meltano | Extraction failed (1): Exception: Only INCREMENTAL and FULL TABLE replication methods are supported
meltano | ELT could not be completed: Extractor failed
ELT could not be completed: Extractor failedaaronsteers
05/20/2021, 3:59 PMdouwe_maan
05/20/2021, 4:01 PM--properties vs `--catalog`: if the tap only supports --properties , it needs only the properties capability, but meltano elt will still take the catalog in --catalog , and pass it to the tap using the appropriate flagaaronsteers
05/20/2021, 4:12 PMaaronsteers
05/20/2021, 4:19 PMmeltano invoke --dump=catalog <plugin> as shown here: https://meltano.com/docs/command-line-interface.html#how-to-use-7
This will give you the discovered catalog file text you can optionally modify manually and/or pass back in if you are not able to config or customize using meltano.yml.surya_g
05/20/2021, 4:21 PM{
"streams": [
{
"tap_stream_id": "SNOWFLAKE_SAMPLE_DATA-TPCDS_SF10TCL-CALL_CENTER",
"table_name": "CALL_CENTER",
"schema": {
"properties": {
"CC_CALL_CENTER_SK": {
"inclusion": "available",
"type": [
"null",
"number"
]
},surya_g
05/20/2021, 4:21 PMaaronsteers
05/20/2021, 4:22 PMsurya_g
05/20/2021, 4:22 PMsurya_g
05/20/2021, 4:24 PMmetadata:
SNOWFLAKE_SAMPLE_DATA_TPCDS_SF10TCL_CALL_CENTER:
replication-method: FULL_TABLE
capabilities:
- properties
- catalog
- discover
select:
- SNOWFLAKE_SAMPLE_DATA_TPCDS_SF10TCL_*surya_g
05/20/2021, 4:24 PMmeltano elt pipelinewise-tap-snowflake target-postgres
meltano | Running extract & load...
pipelinewise-tap-snowflake | /Users/sgaddipati/code/meltano/attentive/.meltano/extractors/pipelinewise-tap-snowflake/venv/lib/python3.8/site-packages/pandas/compat/__init__.py:120: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
pipelinewise-tap-snowflake | warnings.warn(msg)
pipelinewise-tap-snowflake | time=2021-05-20 11:23:14 name=tap_snowflake level=INFO message=Getting column information for snowflake_sample_data.tpcds_sf10tcl.CALL_CENTER...
meltano | Incremental state has been updated at 2021-05-20 16:23:16.270232.
meltano | Extract & load complete!
meltano | Transformation skipped.surya_g
05/20/2021, 4:24 PMdouwe_maan
05/20/2021, 4:30 PMselect to SNOWFLAKE_SAMPLE_DATA-TPCDS_SF10TCL-*.* ?surya_g
05/20/2021, 4:31 PMsurya_g
05/20/2021, 4:32 PMsurya_g
05/20/2021, 4:32 PMaaronsteers
05/20/2021, 4:35 PM"tap_stream_id": "SNOWFLAKE_SAMPLE_DATA-TPCDS_SF10TCL-CALL_CENTER",
"table_name": "CALL_CENTER",aaronsteers
05/20/2021, 4:36 PMtable_name ref above is (according to Singer Spec) a documentation of the upstream table name, not the intended downstream one. This was very confusing to me when I first started out, which is why I want to call it out.)surya_g
05/20/2021, 4:44 PMadd an explicit stream name or otherwise override that behaviordouwe_maan
05/20/2021, 4:49 PMaaronsteers
05/20/2021, 4:51 PMaaronsteers
05/20/2021, 4:54 PM"stream": "call_center", entry just below the tap_stream_id declaration into your catalog file (as quoted in this message), but the downside is that then you are maintaining that custom catalog. Douwe’s suggestion of switching to the other variant would be easier and probably the better way to go.surya_g
05/20/2021, 5:01 PMsurya_g
05/20/2021, 5:01 PM(.venv) ip-192-168-86-137:attentive sgaddipati$ meltano elt pipelinewise-tap-snowflake target-postgres
meltano | Running extract & load...
pipelinewise-tap-snowflake | /Users/sgaddipati/code/meltano/attentive/.meltano/extractors/pipelinewise-tap-snowflake/venv/lib/python3.8/site-packages/pandas/compat/__init__.py:120: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
pipelinewise-tap-snowflake | warnings.warn(msg)
pipelinewise-tap-snowflake | time=2021-05-20 11:59:12 name=tap_snowflake level=INFO message=Getting column information for snowflake_sample_data.tpcds_sf10tcl.CALL_CENTER...
pipelinewise-tap-snowflake | time=2021-05-20 11:59:13 name=tap_snowflake level=INFO message=Beginning to sync SNOWFLAKE_SAMPLE_DATA.TPCDS_SF10TCL.CALL_CENTER
pipelinewise-tap-snowflake | time=2021-05-20 11:59:13 name=tap_snowflake level=INFO message=Stream SNOWFLAKE_SAMPLE_DATA-TPCDS_SF10TCL-CALL_CENTER is using full table replication
target-postgres | time=2021-05-20 11:59:13 name=target_postgres level=CRITICAL message=Primary key is set to mandatory but not defined in the [SNOWFLAKE_SAMPLE_DATA-TPCDS_SF10TCL-CALL_CENTER] stream
target-postgres | Traceback (most recent call last):
target-postgres | File "/Users/sgaddipati/code/meltano/attentive/.meltano/loaders/target-postgres/venv/bin/target-postgres", line 8, in <module>
target-postgres | sys.exit(main())
target-postgres | File "/Users/sgaddipati/code/meltano/attentive/.meltano/loaders/target-postgres/venv/lib/python3.8/site-packages/target_postgres/__init__.py", line 373, in main
target-postgres | persist_lines(config, singer_messages)
target-postgres | File "/Users/sgaddipati/code/meltano/attentive/.meltano/loaders/target-postgres/venv/lib/python3.8/site-packages/target_postgres/__init__.py", line 209, in persist_lines
target-postgres | raise Exception("key_properties field is required")
target-postgres | Exception: key_properties field is required
meltano | Loading failed (1): Exception: key_properties field is required
meltano | ELT could not be completed: Loader failed
ELT could not be completed: Loader failedaaronsteers
05/20/2021, 5:05 PMsurya_g
05/20/2021, 5:05 PMsurya_g
05/20/2021, 5:05 PMaaronsteers
05/20/2021, 5:06 PMprimary_key_required (sic) setting. It only exists to prevent users from getting shocked by duplicates in the downstream, since without a primary key set, the target just appends records each time.aaronsteers
05/20/2021, 5:07 PMsurya_g
05/20/2021, 6:25 PMsurya_g
05/20/2021, 6:26 PMaaronsteers
05/20/2021, 7:32 PM