Skip to content
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

feat: implement support for append_dedup in iceberg dest #48731

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

subodh1810
Copy link
Contributor

No description provided.

@subodh1810 subodh1810 self-assigned this Nov 27, 2024
@subodh1810 subodh1810 requested a review from a team as a code owner November 27, 2024 20:33
Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Nov 27, 2024 9:10pm

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues CDK Connector Development Kit connectors/destination/iceberg-v2 labels Nov 27, 2024
@@ -57,16 +59,26 @@ public InternalRecordWrapper wrapper() {
return wrapper;
}

public Record constructIdentifierRecord(Record row) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: does this need to be public?

Copy link
Contributor

@jdpgrailsdev jdpgrailsdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: one nit

@subodh1810 subodh1810 merged commit 2337025 into master Nov 27, 2024
33 checks passed
@subodh1810 subodh1810 deleted the iceberg-append-dedup branch November 27, 2024 21:28
val identifierFields = mutableSetOf<Int>()
val identifierFieldNames = primaryKeys.flatten().toSet()
val icebergTypeConverter = AirbyteTypeToIcebergSchema()
this.properties.entries.forEach { (name, field) ->
val id = generatedSchemaFieldId()
mutableListOf.add(
val isPrimaryKey = identifierFieldNames.contains(name)
val isOptional = !isPrimaryKey && field.nullable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi we tried enforcing PK requiredness at one point and it caused a lot of problems (there's a surprising number of sources that emit null PKs). If iceberg supports null values in a partition key, we should do that instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just wont allow you to mark a field as an identifier field if its nullable. Only non-nullable fields can be identifier fields

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh. I think we Officially Support composite PKs with nullable fields #31926 (see also slack #p0-primay-keys-cannot-be-null)

so that's going to be awkward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues CDK Connector Development Kit connectors/destination/iceberg-v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants