Caio Carvalho
03/01/2024, 2:40 PMMatt Menzenski
03/01/2024, 2:41 PMCaio Carvalho
03/01/2024, 2:46 PMCaio Carvalho
03/01/2024, 4:01 PMMatt Menzenski
03/01/2024, 8:35 PMresume token string was not a valid hex stringhad you run the same meltano tap previously in incremental replication mode? You might need to rerun it with
--full-refresh
to ignore any saved state / replication keyMatt Menzenski
03/01/2024, 8:35 PMCaio Carvalho
03/01/2024, 8:47 PMCaio Carvalho
03/01/2024, 8:48 PMversion: 1
default_environment: dev
project_id: fe37a16b-a105-4c84-8af7-649ff980ebdf
environments:
- name: dev
- name: staging
- name: prod
plugins:
extractors:
- name: tap-mongodb
variant: meltanolabs
pip_url: git+<https://github.com/MeltanoLabs/tap-mongodb.git>
config:
mongodb_connection_string: <mongodb://127.0.0.1:27017/?replicaSet=rs0>
database: checklist_facil
flattening_enabled: true
flattening_max_depth: 100
add_record_metadata: true
allow_modify_change_streams: true
select:
- countries.*
metadata:
'*':
replication-key: replication_key
replication-method: LOG_BASED
stream_maps:
countries:
loaders:
- name: target-jsonl
variant: andyh1203
pip_url: target-jsonl
- name: target-postgres
variant: meltanolabs
pip_url: meltanolabs-target-postgres
config:
add_record_metadata: true
database: postgres
default_target_schema: checklist_facil
flattening_enabled: true
flattening_max_depth: 100
host: localhost
port: 5432
user: postgres
mappers:
- name: meltano-map-transformer
variant: meltano
pip_url: git+<https://github.com/MeltanoLabs/meltano-map-transform.git>
mappings:
- name: set_fields_jd
config:
stream_maps:
countries:
document___id: document___id
Matt Menzenski
03/01/2024, 8:58 PMI have a doubt. When I use replication-method: LOG_BASED the documents not are loaded only replication_key. If I use replication-method the documents are loaded.
Is possible to use de LOG_BASED and send the document values to postgres database?The log-based replication mode sets
full_document=updateLookup
(source) so it will return the full documents, but the change stream is limited in its scope. You’ll only get events that have occurred since the last run of the tap (and the tap must be run frequently enough that the saved replication key is still available in the change stream/operations log).
I usually run two versions of the tap, one in incremental replication mode (to load all already-existing records) and one in log-based replication mode (to consume updates from that point on).Matt Menzenski
03/01/2024, 8:59 PMCaio Carvalho
03/01/2024, 9:00 PM