Skip to content
v2.278.0

CfnPartitionProps Struct ​

Properties for defining a CfnPartition.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_glue as glue } from 'aws-cdk-lib';

declare const parameters: any;
declare const skewedColumnValueLocationMaps: any;
const cfnPartitionProps: glue.CfnPartitionProps = {
  catalogId: 'catalogId',
  databaseName: 'databaseName',
  partitionInput: {
    values: ['values'],

    // the properties below are optional
    parameters: parameters,
    storageDescriptor: {
      bucketColumns: ['bucketColumns'],
      columns: [{
        name: 'name',

        // the properties below are optional
        comment: 'comment',
        type: 'type',
      }],
      compressed: false,
      inputFormat: 'inputFormat',
      location: 'location',
      numberOfBuckets: 123,
      outputFormat: 'outputFormat',
      parameters: parameters,
      schemaReference: {
        schemaId: {
          registryName: 'registryName',
          schemaArn: 'schemaArn',
          schemaName: 'schemaName',
        },
        schemaVersionId: 'schemaVersionId',
        schemaVersionNumber: 123,
      },
      serdeInfo: {
        name: 'name',
        parameters: parameters,
        serializationLibrary: 'serializationLibrary',
      },
      skewedInfo: {
        skewedColumnNames: ['skewedColumnNames'],
        skewedColumnValueLocationMaps: skewedColumnValueLocationMaps,
        skewedColumnValues: ['skewedColumnValues'],
      },
      sortColumns: [{
        column: 'column',

        // the properties below are optional
        sortOrder: 123,
      }],
      storedAsSubDirectories: false,
    },
  },
  tableName: 'tableName',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

# parameters: Any
# skewed_column_value_location_maps: Any

cfn_partition_props = glue.CfnPartitionProps(
    catalog_id="catalogId",
    database_name="databaseName",
    partition_input=glue.CfnPartition.PartitionInputProperty(
        values=["values"],

        # the properties below are optional
        parameters=parameters,
        storage_descriptor=glue.CfnPartition.StorageDescriptorProperty(
            bucket_columns=["bucketColumns"],
            columns=[glue.CfnPartition.ColumnProperty(
                name="name",

                # the properties below are optional
                comment="comment",
                type="type"
            )],
            compressed=False,
            input_format="inputFormat",
            location="location",
            number_of_buckets=123,
            output_format="outputFormat",
            parameters=parameters,
            schema_reference=glue.CfnPartition.SchemaReferenceProperty(
                schema_id=glue.CfnPartition.SchemaIdProperty(
                    registry_name="registryName",
                    schema_arn="schemaArn",
                    schema_name="schemaName"
                ),
                schema_version_id="schemaVersionId",
                schema_version_number=123
            ),
            serde_info=glue.CfnPartition.SerdeInfoProperty(
                name="name",
                parameters=parameters,
                serialization_library="serializationLibrary"
            ),
            skewed_info=glue.CfnPartition.SkewedInfoProperty(
                skewed_column_names=["skewedColumnNames"],
                skewed_column_value_location_maps=skewed_column_value_location_maps,
                skewed_column_values=["skewedColumnValues"]
            ),
            sort_columns=[glue.CfnPartition.OrderProperty(
                column="column",

                # the properties below are optional
                sort_order=123
            )],
            stored_as_sub_directories=False
        )
    ),
    table_name="tableName"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.glue.*;

Object parameters;
Object skewedColumnValueLocationMaps;

CfnPartitionProps cfnPartitionProps = CfnPartitionProps.builder()
        .catalogId("catalogId")
        .databaseName("databaseName")
        .partitionInput(PartitionInputProperty.builder()
                .values(List.of("values"))

                // the properties below are optional
                .parameters(parameters)
                .storageDescriptor(StorageDescriptorProperty.builder()
                        .bucketColumns(List.of("bucketColumns"))
                        .columns(List.of(ColumnProperty.builder()
                                .name("name")

                                // the properties below are optional
                                .comment("comment")
                                .type("type")
                                .build()))
                        .compressed(false)
                        .inputFormat("inputFormat")
                        .location("location")
                        .numberOfBuckets(123)
                        .outputFormat("outputFormat")
                        .parameters(parameters)
                        .schemaReference(SchemaReferenceProperty.builder()
                                .schemaId(SchemaIdProperty.builder()
                                        .registryName("registryName")
                                        .schemaArn("schemaArn")
                                        .schemaName("schemaName")
                                        .build())
                                .schemaVersionId("schemaVersionId")
                                .schemaVersionNumber(123)
                                .build())
                        .serdeInfo(SerdeInfoProperty.builder()
                                .name("name")
                                .parameters(parameters)
                                .serializationLibrary("serializationLibrary")
                                .build())
                        .skewedInfo(SkewedInfoProperty.builder()
                                .skewedColumnNames(List.of("skewedColumnNames"))
                                .skewedColumnValueLocationMaps(skewedColumnValueLocationMaps)
                                .skewedColumnValues(List.of("skewedColumnValues"))
                                .build())
                        .sortColumns(List.of(OrderProperty.builder()
                                .column("column")

                                // the properties below are optional
                                .sortOrder(123)
                                .build()))
                        .storedAsSubDirectories(false)
                        .build())
                .build())
        .tableName("tableName")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Glue;

var parameters;
var skewedColumnValueLocationMaps;

var cfnPartitionProps = new CfnPartitionProps {
    CatalogId = "catalogId",
    DatabaseName = "databaseName",
    PartitionInput = new PartitionInputProperty {
        Values = new [] { "values" },

        // the properties below are optional
        Parameters = parameters,
        StorageDescriptor = new StorageDescriptorProperty {
            BucketColumns = new [] { "bucketColumns" },
            Columns = new [] { new ColumnProperty {
                Name = "name",

                // the properties below are optional
                Comment = "comment",
                Type = "type"
            } },
            Compressed = false,
            InputFormat = "inputFormat",
            Location = "location",
            NumberOfBuckets = 123,
            OutputFormat = "outputFormat",
            Parameters = parameters,
            SchemaReference = new SchemaReferenceProperty {
                SchemaId = new SchemaIdProperty {
                    RegistryName = "registryName",
                    SchemaArn = "schemaArn",
                    SchemaName = "schemaName"
                },
                SchemaVersionId = "schemaVersionId",
                SchemaVersionNumber = 123
            },
            SerdeInfo = new SerdeInfoProperty {
                Name = "name",
                Parameters = parameters,
                SerializationLibrary = "serializationLibrary"
            },
            SkewedInfo = new SkewedInfoProperty {
                SkewedColumnNames = new [] { "skewedColumnNames" },
                SkewedColumnValueLocationMaps = skewedColumnValueLocationMaps,
                SkewedColumnValues = new [] { "skewedColumnValues" }
            },
            SortColumns = new [] { new OrderProperty {
                Column = "column",

                // the properties below are optional
                SortOrder = 123
            } },
            StoredAsSubDirectories = false
        }
    },
    TableName = "tableName"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var parameters interface{}
var skewedColumnValueLocationMaps interface{}

cfnPartitionProps := &CfnPartitionProps{
	CatalogId: jsii.String("catalogId"),
	DatabaseName: jsii.String("databaseName"),
	PartitionInput: &PartitionInputProperty{
		Values: []*string{
			jsii.String("values"),
		},

		// the properties below are optional
		Parameters: parameters,
		StorageDescriptor: &StorageDescriptorProperty{
			BucketColumns: []*string{
				jsii.String("bucketColumns"),
			},
			Columns: []interface{}{
				&ColumnProperty{
					Name: jsii.String("name"),

					// the properties below are optional
					Comment: jsii.String("comment"),
					Type: jsii.String("type"),
				},
			},
			Compressed: jsii.Boolean(false),
			InputFormat: jsii.String("inputFormat"),
			Location: jsii.String("location"),
			NumberOfBuckets: jsii.Number(123),
			OutputFormat: jsii.String("outputFormat"),
			Parameters: parameters,
			SchemaReference: &SchemaReferenceProperty{
				SchemaId: &SchemaIdProperty{
					RegistryName: jsii.String("registryName"),
					SchemaArn: jsii.String("schemaArn"),
					SchemaName: jsii.String("schemaName"),
				},
				SchemaVersionId: jsii.String("schemaVersionId"),
				SchemaVersionNumber: jsii.Number(123),
			},
			SerdeInfo: &SerdeInfoProperty{
				Name: jsii.String("name"),
				Parameters: parameters,
				SerializationLibrary: jsii.String("serializationLibrary"),
			},
			SkewedInfo: &SkewedInfoProperty{
				SkewedColumnNames: []*string{
					jsii.String("skewedColumnNames"),
				},
				SkewedColumnValueLocationMaps: skewedColumnValueLocationMaps,
				SkewedColumnValues: []*string{
					jsii.String("skewedColumnValues"),
				},
			},
			SortColumns: []interface{}{
				&OrderProperty{
					Column: jsii.String("column"),

					// the properties below are optional
					SortOrder: jsii.Number(123),
				},
			},
			StoredAsSubDirectories: jsii.Boolean(false),
		},
	},
	TableName: jsii.String("tableName"),
}

Properties ​

catalogIdstringcatalog_idstrcatalogIdStringCatalogIdstringCatalogId*string required #
The AWS account ID of the catalog in which the partion is to be created.

To specify the account ID, you can use the Ref intrinsic function with the AWS::AccountId pseudo parameter. For example: !Ref AWS::AccountId

databaseNamestringdatabase_namestrdatabaseNameStringDatabaseNamestringDatabaseName*string required #
The name of the catalog database in which to create the partition.
partitionInputIResolvable | CfnPartition.PartitionInputPropertypartition_inputtyping.Union[IResolvable, PartitionInputProperty]partitionInputIResolvablePartitionInputIResolvablePartitionInputinterface{} required #
The structure used to create and update a partition.
tableNamestringtable_namestrtableNameStringTableNamestringTableName*string required #
The name of the metadata table in which the partition is to be created.