xiaoxuandev commented on a change in pull request #4423:
URL: https://github.com/apache/iceberg/pull/4423#discussion_r839321354
##########
File path:
aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java
##########
@@ -111,6 +113,17 @@ protected void doRefresh() {
@Override
protected void doCommit(TableMetadata base, TableMetadata metadata) {
+ // LakeFormation credential require TableArn as input, so creating a dummy
table
+ // beforehand for create table scenario
+ if (awsProperties.glueLakeFormationEnabled() && base == null) {
+ glue.createTable(CreateTableRequest.builder()
+ .databaseName(databaseName)
+ .tableInput(TableInput.builder()
+ .parameters(ImmutableMap.of(TABLE_TYPE_PROP,
ICEBERG_TABLE_TYPE_VALUE))
+ .name(tableName)
+
.storageDescriptor(StorageDescriptor.builder().location(metadata.location()).build())
+ .build()).build());
+ }
String newMetadataLocation = writeNewMetadata(metadata, currentVersion() +
1);
Review comment:
done. thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]