AWS Glue Partition Index
This page shows how to write Terraform and CloudFormation for AWS Glue Partition Index and write them securely.
aws_glue_partition_index (Terraform)
The Partition Index in AWS Glue can be configured in Terraform with the resource name aws_glue_partition_index
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
The following arguments are required:
table_name
- (Required) Name of the table. For Hive compatibility, this must be entirely lowercase.database_name
- (Required) Name of the metadata database where the table metadata resides. For Hive compatibility, this must be all lowercase.partition_index
- (Required) Configuration block for a partition index. Seepartition_index
below.catalog_id
- (Optional) The catalog ID where the table resides.
partition_index
index_name
- (Required) Name of the partition index.keys
- (Required) Keys for the partition index.
In addition to all arguments above, the following attributes are exported:
id
- Catalog ID, Database name, table name, and index name.
Explanation in Terraform Registry
AWS::Glue::Partition (CloudFormation)
The Partition in Glue can be configured in CloudFormation with the resource name AWS::Glue::Partition
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
Type: AWS::Glue::Partition
Properties:
CatalogId: String
DatabaseName: String
PartitionInput:
PartitionInput
Type: AWS::Glue::Partition
Properties:
CatalogId: !Ref AWS::AccountId
DatabaseName: !Ref testdb
TableName: !Ref Table1
PartitionInput:
Type: AWS::Glue::Partition
Properties:
CatalogId: !Ref AWS::AccountId
DatabaseName: !Ref CFNDatabaseName
TableName: !Ref CFNTableName1
PartitionInput:
Type: AWS::Glue::Partition
Properties:
CatalogId: !Ref AWS::AccountId
DatabaseName: !Ref TestDB
TableName: !Ref Table1
PartitionInput:
Type: AWS::Glue::Partition
Properties:
CatalogId: !Ref AWS::AccountId
DatabaseName: !Ref DatabaseName
TableName: !Ref TableName
PartitionInput:
"AWS::Glue::Partition.StorageDescriptor": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html",
"Properties": {
"StoredAsSubDirectories": {
"Required": false,
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-storedassubdirectories",
"AWS::Glue::Partition.StorageDescriptor": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html",
"Properties": {
"StoredAsSubDirectories": {
"Required": false,
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-storedassubdirectories",
"AWS::Glue::Partition.StorageDescriptor": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html",
"Properties": {
"StoredAsSubDirectories": {
"Required": false,
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-storedassubdirectories",
"AWS::Glue::Partition.StorageDescriptor": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html",
"Properties": {
"StoredAsSubDirectories": {
"Required": false,
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-storedassubdirectories",
"AWS::Glue::Partition.StorageDescriptor": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html",
"Properties": {
"StoredAsSubDirectories": {
"Required": false,
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-storedassubdirectories",
Parameters
-
TableName
required - String -
DatabaseName
required - String -
CatalogId
required - String -
PartitionInput
required - PartitionInput
Explanation in CloudFormation Registry
The
AWS::Glue::Partition
resource creates an AWS Glue partition, which represents a slice of table data. For more information, see CreatePartition Action and Partition Structure in the AWS Glue Developer Guide.
Frequently asked questions
What is AWS Glue Partition Index?
AWS Glue Partition Index is a resource for Glue of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS Glue Partition Index?
For CloudFormation, the MohamedMesrah/SAM-Resources, godwillngwanah/AWS-Sol-Arch-02 and RittikaJ/awssync source code examples are useful. See the CloudFormation Example section for further details.