niall_keleher
05/04/2023, 5:20 PMtap-postgres
. When a meltano run tap-postgres target-xyz
breaks mid-run, I’m not seeing any partial state records stored, when I check meltano state get {STATE_ID}
. In reviewing the docs [here](https://docs.meltano.com/guide/integration#internal-state-merge-logic), I believe that the meltanolabs variant should emit state, but am confused about why it doesn’t show up.visch
05/04/2023, 6:40 PMniall_keleher
05/04/2023, 7:02 PMversion: 1
default_environment: dev
project_id: 56cb011e-0de6-4256-ac45-5f0b5c938d54
environments:
- name: dev
plugins:
extractors:
- name: tap-postgres
variant: meltanolabs
pip_url: git+<https://github.com/MeltanoLabs/tap-postgres.git>
select:
- '!*.email'
- '!*.email_display'
- '!*.firstname'
- '!*.lastname'
- '!*.password_hash'
- '!*.signing_key'
- public-users.*
- public-account_invites.*
- public-accounts.*
- public-user_roles.*
- public-product_licenses.*
- public-teams.*
- public-user_teams.*
- name: tap-postgres--documents
inherit_from: tap-postgres
select:
- public-documents.*
- name: tap-postgres--document-edit
inherit_from: tap-postgres
select:
- public-document_edit.*
- name: tap-postgres--sessions
inherit_from: tap-postgres
select:
- public-sessions.*
loaders:
- name: target-athena
variant: meltanolabs
pip_url: git+<https://github.com/MeltanoLabs/target-athena.git>
config:
athena_database: meltano_postgres
aws_region: us-east-1
s3_bucket: bucket-name
s3_staging_dir: <s3://staging_dir/temp/>
add_record_metadata: true
encryption_type: none
compression: gzip
object_format: jsonl
niall_keleher
05/04/2023, 7:04 PMmeltano state get dev:tap-postgres--sessions-to-target-athena
niall_keleher
05/04/2023, 7:04 PM2023-05-04T19:03:56.191878Z [info ] The default environment 'dev' will be ignored for `meltano state`. To configure a specific environment, please use the option `--environment=<environment name>`.
2023-05-04T19:03:56.436856Z [warning ] Running state operation for environment 'dev' outside of an environment
2023-05-04T19:03:56.437537Z [info ] Environment 'dev' is active
{"singer_state": {"bookmarks": {"public-sessions": {}}}}
visch
05/04/2023, 7:13 PMpublic-team
To set the replication-key you have to do something like this
extractors:
- name: tap-postgres
variant: meltanolabs
pip_url: git+<https://github.com/MeltanoLabs/tap-postgres.git>
select:
- '!*.email'
- '!*.email_display'
- '!*.firstname'
- '!*.lastname'
- '!*.password_hash'
- '!*.signing_key'
- public-users.*
- public-account_invites.*
- public-accounts.*
- public-user_roles.*
- public-product_licenses.*
- public-teams.*
- public-user_teams.*
metadata:
'public-team':
replication-method: INCREMENTAL
replication_key: "updated_at"
Right now if you ran meltano invoke --dump=catalog tap-postgres > catalog.json
I think you'd see your tables are getting pulled with the relication method of FULL_TABLEvisch
05/04/2023, 7:18 PMniall_keleher
05/04/2023, 7:23 PMvisch
05/04/2023, 7:23 PM