Stéphane Burwash
08/23/2022, 2:12 PMreplication_key_sql_datatype = md_map.get(('properties', replication_key)).get('sql-datatype')
AttributeError: 'NoneType' object has no attribute 'get'
When running the tap. Anyone ever encounter this?aaronsteers
08/23/2022, 4:32 PMNoneType
output is the result of md_map.get(('properties', replication_key))
, meaning the the tap could not find reference to the incremental replication key in your schema catalog. Can you double check the spelling of the replication_key perhaps? Might also be worth confirming manually if the generated catalog includes that column in its metadata.Stéphane Burwash
08/23/2022, 4:37 PMaaronsteers
08/23/2022, 5:22 PMmeltano invoke --dump=catalog <plugin>
where <plugin>
is tap-postgres
?aaronsteers
08/23/2022, 5:22 PMaaronsteers
08/23/2022, 5:22 PMStéphane Burwash
08/23/2022, 5:24 PMaaronsteers
08/23/2022, 5:25 PMmeltano.yml
file.aaronsteers
08/23/2022, 5:26 PMmeltano.yml
, then this looks increasingly like a bug on the tap side.aaronsteers
08/23/2022, 5:26 PMmeltano.yml
which pertains to this extractor.Stéphane Burwash
08/23/2022, 5:28 PM- name: tap-postgres
variant: transferwise
pip_url: pipelinewise-tap-postgres
config:
host: localhost
port: 36173
dbname: name
user: username
default_replication_method: incremental
Stéphane Burwash
08/23/2022, 5:29 PMStéphane Burwash
08/23/2022, 5:34 PMaaronsteers
08/23/2022, 5:35 PMaaronsteers
08/23/2022, 5:35 PMdefault_replication_method: incremental
?aaronsteers
08/23/2022, 5:35 PMStéphane Burwash
08/23/2022, 5:36 PMraise Exception(f"Unrecognized replication_method {replication_method}")
Stéphane Burwash
08/23/2022, 5:36 PMException: Unrecognized replication_method None
aaronsteers
08/23/2022, 5:36 PMStéphane Burwash
08/23/2022, 5:37 PMaaronsteers
08/23/2022, 5:37 PMdefault_replication_method: LOG_BASED
Stéphane Burwash
08/23/2022, 5:39 PMaaronsteers
08/23/2022, 5:39 PMStéphane Burwash
08/23/2022, 5:39 PMStéphane Burwash
08/23/2022, 5:39 PMaaronsteers
08/23/2022, 5:40 PMINCREMENTAL
in Singer-Spec is actually short-hand for Key-Based Incremental
, which for database sources would require you to specify a UpdatedOn
column name or similar for each table. The LOG_BASED
is also incremental, but it uses the system internal logs so it doesn't need a designated incremntal key column to be specified.aaronsteers
08/23/2022, 5:41 PMSo we would qualify this as a failing on my part with incremental, or with the tap?The tap could do a better job of giving friendly error messages. For my part, I probably should have asked up front if you wanted to use log-based (automatic) incremental or key-based incremental.
Stéphane Burwash
08/23/2022, 5:41 PMaaronsteers
08/23/2022, 5:42 PMStéphane Burwash
08/23/2022, 5:47 PMaaronsteers
08/23/2022, 5:50 PMaaronsteers
08/23/2022, 5:50 PM```extractors:
- name: tap-postgres
metadata:
some_stream_id:
replication-method: INCREMENTAL
replication-key: created_at
created_at:
is-replication-key: true```
Stéphane Burwash
08/23/2022, 5:51 PMaaronsteers
08/23/2022, 5:51 PMaaronsteers
08/23/2022, 5:51 PMaaronsteers
08/23/2022, 5:52 PMStéphane Burwash
08/23/2022, 5:52 PMchristoph
08/23/2022, 10:30 PMplugins:
extractors:
- name: tap-postgres
variant: transferwise
metadata:
<streamnamefromtap>:
table-key-properties:
- KeyColumnName1
- KeyColumnName2