Hey guys! I am currently working on the meltano ta...
# troubleshooting
s
Hey guys! I am currently working on the meltano tap oracle and would like to set the replication method to INCREMENTAL. When using the replication key which is represented by a unique numeric value in my database i get an error in meltano stating: AttributeError: 'NoneType' object has no attribute 'get'. Extractor failed. Did I do something wrong? Thanks in advance!
r
Can you share the stack trace? You may get more context with
--log-level debug
.
s
Not sure how much I can share but the error pops up after the following info log: replication_key_sql_datatype = md.get(('properties', replication_key)).get('sql-datatype')
But if you tell me which lines in the stack trace could be useful I will share them with sensetive content removed
r
Copy code
replication_key_sql_datatype = md.get(('properties', replication_key))
implies you are looking up a value in a dictionary by a tuple key of
('properties', replication_key)
. Is this what you intended? My guess would be that you're probably getting
None
back here, hence
'NoneType' object has no attribute 'get'
on the chained
get
call. Did you instead want to default to
replication_key
given no value for
properties
? In this case you, need to remove the extra set of parenthesis:
Copy code
replication_key_sql_datatype = md.get('properties', replication_key)
Or maybe
Copy code
replication_key_sql_datatype = md.get('properties', {}).get(replication_key, {}).get('sql-datatype')
s
I didn't write this code myself, so i have no idea if a change is possible or should be done. I think the error might be with my database column
Furthermore the line gets logged with the info tag not the error one. So it shouldn't be an issue
I've now come so far as to realise the error is in the config. When validating I get the following error: AttributeError: 'NoneType' object has no attribute 'get'
Even more, I now know that the metadata tag doesn't work.
@Reuben (Matatika) here is my meltano.yml: environments: - name: dev config: plugins: extractors: - name: tap-oracle--hr config: host: port: user: password: filter_schemas: HR filter_tables: - HR-JOBS sid: default_replication_method: FULL_TABLE metadata: HR-JOBS: replication-method: INCREMENTAL replication-key: updated_at updated_at: is-replication-key: true
maybe you can tell me whats wrong with it
r
Ah, OK. I thought you were making changes to the tap source code. I haven't actually used
tap-oracle
myself, so I can't really say if you're config looks correct or not, sorry. Some things to check though: • Is
updated_at
a top-level field? • Should you be specifying the
replication-key
as
updated_at
as well as
is-replication-key: true
on the replication key property itself?
s
Unfortunately those things all check out, still thank you for the help!
r
No problem, sorry I couldn't help any further. 😅 Hopefully someone else with more experience with this tap can help.
e
Hey @sebastian_slanitsch!
Copy code
AttributeError: 'NoneType' object has no attribute 'get'. Extractor failed.
This is usually caused by a badly formatted/indented
meltano.yml
file. I see
sid
doesn’t have a value, so maybe that’s the issue.
s
Hey @edgar_ramirez_mondragon! SID has a value, I've just removed it to post here. I've checked the yaml indentation, but that doesn't seem to be a problem.
It all boils down to the metadata tag. When i comment it out, it all works again. Is there anything I am not aware of when using metadata