-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Destination S3 (avro/parquet format): handle empty schemas #44933
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -175,7 +177,7 @@ enum class AirbyteJsonSchemaType { | |||
// Usually the root node | |||
return OBJECT_WITH_PROPERTIES | |||
} else { | |||
throw IllegalArgumentException("Unspecified schema type") |
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.
Should we be explicit about the fact that we're matching an empty {}
? Or do you want to use this as a catch-all
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.
more a catchall. So, I guess I should rename it to unknown
in that case 🤔
@@ -36,6 +36,11 @@ class JsonSchemaParquetPreprocessor : JsonSchemaIdentityMapper() { | |||
AirbyteJsonSchemaType.UNION, | |||
AirbyteJsonSchemaType.COMBINED -> | |||
throw IllegalStateException("Nested unions are not supported") | |||
// TODO is this true? |
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.
This is true in the sense that Parquet doesn't have a Json type per se. It has a json-logical type that can be applied to strings, which we don't use, because there's no way to represent it in the Avro schema.
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.
gotcha. I'll update the comment to reflect that
This looks correct to me. You could also consider adding these types to the DATs for avro and parquet. The relevant test method is And the workflow for adding them would be
|
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.
Other than possibly amending the DATs, this is good to go.
/publish-java-cdk
|
Hi. Since this release on Airbyte Cloud we are facing issues : the sync_id is not anymore in destination file name. Seen by some other users => https://airbytehq.slack.com/archives/C021JANJ6TY/p1725177438711539 I have opened issue #45084 |
from https://github.com/airbytehq/oncall/issues/6299
currently, schemas like
{type: array, items: {}}
throw an illegal arg exception because of the empty{}
nested schema. This PR:(.... eventually we should just use AirbyteType here 😅 which has much nicer handling for array/object/primitive types in general)