Created
September 22, 2022 17:53
-
-
Save Samrose-Ahmed/adfca407de1c4f389fbac9d3b0320895 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IcebergMetadataWriter { | |
// In a real world usecase, you can create this dynamically from the data. | |
val icebergTable: Table = icebergCatalog.loadTable(TableIdentifier.of(Namespace.of(NAMESPACE), TABLE_NAME)) | |
val appendFiles: AppendFiles = icebergTable.newAppend() | |
// Lambda handler | |
fun handle(sqsEvent: SQSEvent) { | |
for (record in sqsEvent.records) { | |
processRecord(record, tableObjs) | |
} | |
appendFiles.commit() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment