hello all, I was using tap-jira from meltano to ex...
# troubleshooting
p
hello all, I was using tap-jira from meltano to extract data, noticed that there is schema voilations but on jira end like for array type mentioned in there docs they are sending
"[]"
for null values. How can we handle these cases? one way is to write post_process for the row (in a stream) but I think that would be a very long and manual job, is there a better way of handling this?
v
If you don't want to fix the tap then https://docs.meltano.com/guide/integration/#overriding-schemas allows schema overrides in meltano!
p
I was looking further into this, to fix the tap. Turns out it was because I was flattening the document and thus schema was not matching. which raises the question! why is the schema validation done after flattening? and if the records are flatten, why don't they preserve schema?
just a disclosure: I haven't gone through the flattening logic here but seems pretty odd, if I remove flattening -- almost a lot of schema errors are gone.
I also feel jira is particularly weird because you can add a custom field and then fetch it, so the contract is somewhat not public which means to: 1. Not have customfields and expect users to add it 2. or have some fields and let users create a fork and use it, however they like. but my problem was other than custom fields and more so than the fields why the flattening messed up the datatypes
backtracking here a bit, I read the code now for flattening and it turns out all is fine, it's just sdk flattening doesn't handle ArrayType and just dumps array as a string (link)
still thinking why flattening fails the schema validation, as from the code I can see flattening applies to both, schema and the record
I am not able to understand why the keys of schema in
IssueStream
in tap-jira are flattened but the values are not updated to string but when I use the flattening helpers it does evaluate to correct version.
e
Hi @prakhar_srivastava! I'm not sure I fully understand your issue, but can you confirm if this issue is what you're running into? If so, one workaround is not use a higher flattening depth if possible. That issue was fixed in the v0.32.0b1 prerelease, and I'm planning to do a final release next week.
p
I think this would solve the problem, waiting for the release then