AWS::Glue::TableOptimizer
A resource that describes the AWS Glue resource for enabling compaction to improve read performance for open table formats.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Glue::TableOptimizer", "Properties" : { "CatalogId" :
String
, "DatabaseName" :String
, "TableName" :String
, "TableOptimizerConfiguration" :TableOptimizerConfiguration
, "Type" :String
} }
YAML
Type: AWS::Glue::TableOptimizer Properties: CatalogId:
String
DatabaseName:String
TableName:String
TableOptimizerConfiguration:TableOptimizerConfiguration
Type:String
Properties
CatalogId
-
The catalog ID of the table.
Required: Yes
Type: String
Update requires: Replacement
DatabaseName
-
The name of the database. For Hive compatibility, this is folded to lowercase when it is stored.
Required: Yes
Type: String
Pattern:
[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*
Minimum:
1
Maximum:
255
Update requires: Replacement
TableName
-
The table name. For Hive compatibility, this must be entirely lowercase.
Required: Yes
Type: String
Pattern:
[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*
Minimum:
1
Maximum:
255
Update requires: Replacement
TableOptimizerConfiguration
-
Specifies configuration details of a table optimizer.
Required: Yes
Type: TableOptimizerConfiguration
Update requires: No interruption
Type
-
The type of table optimizer. Currently, the only valid value is compaction.
Required: Yes
Type: String
Update requires: Replacement
Return values
Ref
Fn::GetAtt
Examples
Input format for a table optimizer
JSON
{ "GlueTableOptimizer": { "Type": "AWS::Glue::TableOptimizer", "Properties": { "CatalogId": {"Ref": "AWS::AccountId"}, "DatabaseName": {"Ref": "GlueDatabase"}, "TableName": {"Ref": "GlueTable"}, "Type": "compaction", "TableOptimizerConfiguration": { "RoleArn": {"Fn:: GetAtt": ["CompactionRole", "Arn"]}, "Enabled": true } } } }
YAML
GlueTableOptimizer: Type: AWS::Glue::TableOptimizer Properties: CatalogId: !Ref AWS::AccountId DatabaseName: !Ref GlueDatabase TableName: !Ref GlueTable Type: "compaction" TableOptimizerConfiguration: RoleArn: !GetAtt CompactionRole.Arn Enabled: True