You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If Type is compaction, you cannot specify either OrphanFileDeletionConfiguration or RetentionConfiguration
If Type is retention, you have to provide RetentionConfiguration
If Type is orphan_file_deletion, you have to provide OrphanFileDeletionConfiguration
The CDK implementation of CFN resources is also poor due to incorrect properties, but I have a workaround for folks who want to automate TableOptimizer:
constcfnTableOptimizerCompaction=newCfnTableOptimizer(testStack,'TableOptimizerCompaction',{catalogId: catalogId,//essentially AWS Account IddatabaseName: dbName,tableName: tableName,type: 'compaction',tableOptimizerConfiguration: {enabled: true,//correct permissions here: https://docs.aws.amazon.com/glue/latest/dg/optimization-prerequisites.htmlroleArn: compactionRoleArn}});constcfnTableOptimizerOrphanFileDeletion=newCfnTableOptimizer(testStack,'TableOptimizerOrphanFileDeletion',{catalogId: catalogId,databaseName: dbName,tableName: tableName,type: 'orphan_file_deletion',tableOptimizerConfiguration: {orphanFileDeletionConfiguration: {icebergConfiguration: {// ex: 's3://some-bucket/table', can be found in Table Details in Glue Consolelocation: tableLocation,orphanFileRetentionPeriodInDays: 1}},enabled: true,roleArn: orphanFileDeletionRoleArn}});constcfnTableOptimizerRetention=newCfnTableOptimizer(testStack,'TableOptimizerRetention',{catalogId: catalogId,databaseName: dbName,tableName: tableName,type: 'retention',tableOptimizerConfiguration: {enabled: true,roleArn: retentionRoleArn}});cfnTableOptimizerRetention.addOverride('Properties.TableOptimizerConfiguration.RetentionConfiguration.IcebergConfiguration',{SnapshotRetentionPeriodInDays: 1,NumberOfSnapshotsToRetain: 1,CleanExpiredFiles: true})
The text was updated successfully, but these errors were encountered:
Name of the resource
AWS::Glue::TableOptimizer
Resource name
No response
Reference Link
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-tableoptimizer.html
Details
It's wrong, three values are valid:
compaction
retention
orphan_file_deletion
CLI Reference: https://docs.aws.amazon.com/cli/latest/reference/glue/create-table-optimizer.html
I've been able to use all three values successfully and get the expected result.
It's not. Actually correct structure is:
Also CLI as reference. Also tested.
Type
iscompaction
, you cannot specify eitherOrphanFileDeletionConfiguration
orRetentionConfiguration
Type
isretention
, you have to provideRetentionConfiguration
Type
isorphan_file_deletion
, you have to provideOrphanFileDeletionConfiguration
The CDK implementation of CFN resources is also poor due to incorrect properties, but I have a workaround for folks who want to automate TableOptimizer:
The text was updated successfully, but these errors were encountered: