Hi, Someone already use replication with `tap-reds...
# troubleshooting
a
Hi, Someone already use replication with
tap-redshift
(https://github.com/datadotworld/tap-redshift) ? We defined replication properties in catalog with
replication-method
and
replication-key
but elt method seems not consider the state. At each starting, the elt method return
INFO Building State from raw state {}
while at the end the tap seems create a bookmark like
2022-06-14T07:26:00.952438Z [info     ] Incremental state has been updated at 2022-06-14 07:26:00.952275.
2022-06-14T07:26:00.952663Z [debug    ] Incremental state: {'bookmarks': {'MA TABLE': {'replication_key': '_sdc_batched_at', 'version': 1655191553524, 'replication_key_value': '2022-06-13'}}, 'currently_syncing': None}
v
Do people use it? https://hub.meltano.com/extractors/tap-redshift Seems to point to yes, although not a lot of runs with meltano it seems?
Can you share your meltano.yml, and the command you ran that doesn't consider state?
a
Hi Derek,
Copy code
- name: tap-redshift
  namespace: tap_redshift
  pip_url: git+<https://github.com/signal-ai/tap-redshift.git>
  executable: tap-redshift
  capabilities:
  - catalog
  - discover
  settings:
  - name: host
  - name: port
    value: my_port
  - name: dbname
    value: dwh
  - name: user
  - name: password
  - name: start_date
    value: '2022-06-10T00:00:00Z'
  - name: schema
    value: my_schema
  catalog: extract/redshift_catalog/redshift_catalog.json
We setup tap-redshift in our yml like above.
then we run pipeline with command
meltano elt tap-redshift target-csv --job_id=mon-id
Thanks in advance 🙂
v
Nice, so after you run
meltano elt tap-redshift target-csv --job_id=mon-id
could you then run
meltano state get mon-id
and show the contents?
a
We get the following result
2022-06-14T14:50:13.765961Z [info     ] Environment 'prod' is active
2022-06-14T14:50:14.135180Z [info     ] Found state from 2022-06-14 06:51:16.431545.
{"singer_state": {"bookmarks": {"<http://db.my|db.my>_<http://schema.my|schema.my>_table": {"replication_key": "_sdc_batched_at", "version": 1655189477777, "replication_key_value": "2022-06-13"}}, "currently_syncing": null}}
v
Ok so
<https://docs.meltano.com/reference/command-line-interface#examples>
Copy code
meltano elt tap-redshift target-csv --state-id=mon-id > state.json
Would return the same
Oh I see it
Copy code
- name: tap-redshift
  namespace: tap_redshift
  pip_url: git+<https://github.com/signal-ai/tap-redshift.git>
  executable: tap-redshift
  capabilities:
  - catalog
  - discover
Needs
-state
in the capabilities section
Can you submit an issue to Meltano (if there isn't already one) If a job is ran with state and the tap doesn't have the capability a warning should be printed at a minimum I think to help address this. I've done this same thing before 😄
a
Oh thanks!!!! 😄 tap well work now. I didn't know we have to add capabilities at each tap because sometime tap replication work without specify capabilities.
I don't see any issue about this. I will submit it