-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cdk]: correctly raise unsupported logical type errors when parsing avro #36888
Conversation
…sing avro A typo in the lookup of the field that is causing issues with the Avro schema discovery resulted in error raised by the error being raised. Correcly extract the field, and add a test to check that this continues to work.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @imrehg I requested to the connector team review your change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @imrehg, thank you for the fix!
It looks good to me, and given it was clearly a typo, and code above uses the correct logicalType
key, it's fine to merge by me.
@brianjlai, can you take a quick glance too, to make sure I'm not hallucinating?
The problem, though, is that you would still get the error in this scenario — it's just that you'll see what logical type caused it. Right?
Hey @natikgadzhi, you hit the nail on the head indeed! To give a bit more context: I was trying to ingest an ...
{"name": "end_time", "type": ["null", {"logicalType": "datetime", "type": "string"}]},
... Without this change I had to guess that this was the issue, while with the fix I got to see which field was non-ingestable by AirByte. Having said that, ... 'end_time': '2024-03-27T09:30:00+00:00', ... So this change is a (necessary?) band-aid at the moment, and ideally other logical types should be possible to load as well, likely into their declared primitive types (ie. here into airbyte/airbyte-cdk/python/airbyte_cdk/sources/file_based/file_types/avro_parser.py Lines 28 to 39 in 884face
This is the first time I'm working with
If there was a change, so actually all fastavro-loadable files could be loaded by AirByte, that would be the best outcome of this. Is it possible that this above can happen for the CDK? Should I open a separate issue for it? (I guess yes.) Should I try to submit a MR? (I guess no on that one, given how your team does think about the right ways of fixing things up :) |
@alafanechere another one in a batch of PRs to CDK that I would love to get in. |
We're winning at CI now, @imrehg, setting this to automerge. |
A typo in the lookup of the field that is causing issues with the Avro schema discovery resulted in error raised by the error being raised. Correcly extract the field, and add a test to check that this continues to work.
Related Slack thread: https://airbytehq.slack.com/archives/C021JANJ6TY/p1712557994937269