2 Answers
- Newest
- Most votes
- Most comments
0
I haven't tried with glue.Table, but with glue.CfnTable it worked for me setting tableType='ICEBERG
and parameters={ "classification": "glueparquet", "lakeformation.aso.status": "true" }
The lakeformation.aso.status parameter enables automated compaction.
0
Hello.
CfnTable has an optional parameter openTableFormatInput
. There is a small bit of reference here: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnTable.html#opentableformatinput.
Here is a shortened version of CDK code I used as example, maybe it helps you.
this.table = new glue.CfnTable(this, "Table", {
databaseName: this.databaseName,
catalogId: this.account,
tableInput: {
name: tableName.toLowerCase(),
description: description,
storageDescriptor: {
columns: columns,
location: `s3://${this.bucketName}/${tableName.toLowerCase()}`,
schemaReference: this.schemaReference,
sortColumns: this.sortColumns,
storedAsSubDirectories: false,
},
tableType: 'EXTERNAL_TABLE'
},
openTableFormatInput: {
icebergInput: {
metadataOperation: "CREATE",
version: "2",
}
}
});
answered 5 months ago
Relevant content
- asked 3 months ago
- asked 9 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 months ago
Thank you, I try this approach but with no luck. A simple select from such table is errored: HIVE_UNSUPPORTED_FORMAT: Unable to create input format