CfnPartition

class aws_cdk.aws_glue.CfnPartition(scope, id, *, catalog_id, database_name, partition_input, table_name)

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::Glue::Partition.

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 .

CloudformationResource

AWS::Glue::Partition

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-partition.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_glue as glue

# parameters: Any
# skewed_column_value_location_maps: Any

cfn_partition = glue.CfnPartition(self, "MyCfnPartition",
    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"
)

Create a new AWS::Glue::Partition.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • catalog_id (str) – The AWS account ID of the catalog in which the partion is to be created. .. epigraph:: To specify the account ID, you can use the Ref intrinsic function with the AWS::AccountId pseudo parameter. For example: !Ref AWS::AccountId

  • database_name (str) – The name of the catalog database in which to create the partition.

  • partition_input (Union[IResolvable, PartitionInputProperty]) – The structure used to create and update a partition.

  • table_name (str) – The name of the metadata table in which the partition is to be created.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters

path (str) – The path of the value to delete.

Return type

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters

target (CfnResource) –

Return type

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

None

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters

property_path (str) – The path to the property.

Return type

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters

attribute_name (str) – The name of the attribute.

Return type

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

Any

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters

new_logical_id (str) – The new logical ID to use for this stack element.

Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Returns

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::Glue::Partition'
catalog_id

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-partition.html#cfn-glue-partition-catalogid

Return type

str

cfn_options

Options for this resource, such as condition, update policy etc.

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

Return type

List[str]

database_name

The name of the catalog database in which to create the partition.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-partition.html#cfn-glue-partition-databasename

Return type

str

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Return type

str

Returns

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The construct tree node associated with this construct.

Return type

ConstructNode

partition_input

The structure used to create and update a partition.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-partition.html#cfn-glue-partition-partitioninput

Return type

Union[IResolvable, PartitionInputProperty]

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

Return type

str

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Return type

Stack

table_name

The name of the metadata table in which the partition is to be created.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-partition.html#cfn-glue-partition-tablename

Return type

str

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters

x (Any) –

Return type

bool

Returns

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

ColumnProperty

class CfnPartition.ColumnProperty(*, name, comment=None, type=None)

Bases: object

A column in a Table .

Parameters
  • name (str) – The name of the Column .

  • comment (Optional[str]) – A free-form text comment.

  • type (Optional[str]) – The data type of the Column .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-column.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_glue as glue

column_property = glue.CfnPartition.ColumnProperty(
    name="name",

    # the properties below are optional
    comment="comment",
    type="type"
)

Attributes

comment

A free-form text comment.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-column.html#cfn-glue-partition-column-comment

Return type

Optional[str]

name

The name of the Column .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-column.html#cfn-glue-partition-column-name

Return type

str

type

The data type of the Column .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-column.html#cfn-glue-partition-column-type

Return type

Optional[str]

OrderProperty

class CfnPartition.OrderProperty(*, column, sort_order=None)

Bases: object

Specifies the sort order of a sorted column.

Parameters
  • column (str) – The name of the column.

  • sort_order (Union[int, float, None]) – Indicates that the column is sorted in ascending order ( == 1 ), or in descending order ( ==0 ).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-order.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_glue as glue

order_property = glue.CfnPartition.OrderProperty(
    column="column",

    # the properties below are optional
    sort_order=123
)

Attributes

column

The name of the column.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-order.html#cfn-glue-partition-order-column

Return type

str

sort_order

Indicates that the column is sorted in ascending order ( == 1 ), or in descending order ( ==0 ).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-order.html#cfn-glue-partition-order-sortorder

Return type

Union[int, float, None]

PartitionInputProperty

class CfnPartition.PartitionInputProperty(*, values, parameters=None, storage_descriptor=None)

Bases: object

The structure used to create and update a partition.

Parameters
  • values (Sequence[str]) – The values of the partition. Although this parameter is not required by the SDK, you must specify this parameter for a valid input. The values for the keys for the new partition must be passed as an array of String objects that must be ordered in the same order as the partition keys appearing in the Amazon S3 prefix. Otherwise AWS Glue will add the values to the wrong keys.

  • parameters (Optional[Any]) – These key-value pairs define partition parameters.

  • storage_descriptor (Union[IResolvable, StorageDescriptorProperty, None]) – Provides information about the physical location where the partition is stored.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-partitioninput.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_glue as glue

# parameters: Any
# skewed_column_value_location_maps: Any

partition_input_property = 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
    )
)

Attributes

parameters

These key-value pairs define partition parameters.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-partitioninput.html#cfn-glue-partition-partitioninput-parameters

Return type

Any

storage_descriptor

Provides information about the physical location where the partition is stored.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-partitioninput.html#cfn-glue-partition-partitioninput-storagedescriptor

Return type

Union[IResolvable, StorageDescriptorProperty, None]

values

The values of the partition.

Although this parameter is not required by the SDK, you must specify this parameter for a valid input.

The values for the keys for the new partition must be passed as an array of String objects that must be ordered in the same order as the partition keys appearing in the Amazon S3 prefix. Otherwise AWS Glue will add the values to the wrong keys.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-partitioninput.html#cfn-glue-partition-partitioninput-values

Return type

List[str]

SchemaIdProperty

class CfnPartition.SchemaIdProperty(*, registry_name=None, schema_arn=None, schema_name=None)

Bases: object

A structure that contains schema identity fields.

Either this or the SchemaVersionId has to be provided.

Parameters
  • registry_name (Optional[str]) – The name of the schema registry that contains the schema.

  • schema_arn (Optional[str]) – The Amazon Resource Name (ARN) of the schema. One of SchemaArn or SchemaName has to be provided.

  • schema_name (Optional[str]) – The name of the schema. One of SchemaArn or SchemaName has to be provided.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemaid.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_glue as glue

schema_id_property = glue.CfnPartition.SchemaIdProperty(
    registry_name="registryName",
    schema_arn="schemaArn",
    schema_name="schemaName"
)

Attributes

registry_name

The name of the schema registry that contains the schema.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemaid.html#cfn-glue-partition-schemaid-registryname

Return type

Optional[str]

schema_arn

The Amazon Resource Name (ARN) of the schema.

One of SchemaArn or SchemaName has to be provided.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemaid.html#cfn-glue-partition-schemaid-schemaarn

Return type

Optional[str]

schema_name

The name of the schema.

One of SchemaArn or SchemaName has to be provided.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemaid.html#cfn-glue-partition-schemaid-schemaname

Return type

Optional[str]

SchemaReferenceProperty

class CfnPartition.SchemaReferenceProperty(*, schema_id=None, schema_version_id=None, schema_version_number=None)

Bases: object

An object that references a schema stored in the AWS Glue Schema Registry.

Parameters
  • schema_id (Union[IResolvable, SchemaIdProperty, None]) – A structure that contains schema identity fields. Either this or the SchemaVersionId has to be provided.

  • schema_version_id (Optional[str]) – The unique ID assigned to a version of the schema. Either this or the SchemaId has to be provided.

  • schema_version_number (Union[int, float, None]) – The version number of the schema.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemareference.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_glue as glue

schema_reference_property = 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
)

Attributes

schema_id

A structure that contains schema identity fields.

Either this or the SchemaVersionId has to be provided.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemareference.html#cfn-glue-partition-schemareference-schemaid

Return type

Union[IResolvable, SchemaIdProperty, None]

schema_version_id

The unique ID assigned to a version of the schema.

Either this or the SchemaId has to be provided.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemareference.html#cfn-glue-partition-schemareference-schemaversionid

Return type

Optional[str]

schema_version_number

The version number of the schema.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-schemareference.html#cfn-glue-partition-schemareference-schemaversionnumber

Return type

Union[int, float, None]

SerdeInfoProperty

class CfnPartition.SerdeInfoProperty(*, name=None, parameters=None, serialization_library=None)

Bases: object

Information about a serialization/deserialization program (SerDe) that serves as an extractor and loader.

Parameters
  • name (Optional[str]) – Name of the SerDe.

  • parameters (Optional[Any]) – These key-value pairs define initialization parameters for the SerDe.

  • serialization_library (Optional[str]) – Usually the class that implements the SerDe. An example is org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-serdeinfo.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_glue as glue

# parameters: Any

serde_info_property = glue.CfnPartition.SerdeInfoProperty(
    name="name",
    parameters=parameters,
    serialization_library="serializationLibrary"
)

Attributes

name

Name of the SerDe.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-serdeinfo.html#cfn-glue-partition-serdeinfo-name

Return type

Optional[str]

parameters

These key-value pairs define initialization parameters for the SerDe.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-serdeinfo.html#cfn-glue-partition-serdeinfo-parameters

Return type

Any

serialization_library

Usually the class that implements the SerDe.

An example is org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-serdeinfo.html#cfn-glue-partition-serdeinfo-serializationlibrary

Return type

Optional[str]

SkewedInfoProperty

class CfnPartition.SkewedInfoProperty(*, skewed_column_names=None, skewed_column_value_location_maps=None, skewed_column_values=None)

Bases: object

Specifies skewed values in a table.

Skewed values are those that occur with very high frequency.

Parameters
  • skewed_column_names (Optional[Sequence[str]]) – A list of names of columns that contain skewed values.

  • skewed_column_value_location_maps (Optional[Any]) – A mapping of skewed values to the columns that contain them.

  • skewed_column_values (Optional[Sequence[str]]) – A list of values that appear so frequently as to be considered skewed.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-skewedinfo.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_glue as glue

# skewed_column_value_location_maps: Any

skewed_info_property = glue.CfnPartition.SkewedInfoProperty(
    skewed_column_names=["skewedColumnNames"],
    skewed_column_value_location_maps=skewed_column_value_location_maps,
    skewed_column_values=["skewedColumnValues"]
)

Attributes

skewed_column_names

A list of names of columns that contain skewed values.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-skewedinfo.html#cfn-glue-partition-skewedinfo-skewedcolumnnames

Return type

Optional[List[str]]

skewed_column_value_location_maps

A mapping of skewed values to the columns that contain them.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-skewedinfo.html#cfn-glue-partition-skewedinfo-skewedcolumnvaluelocationmaps

Return type

Any

skewed_column_values

A list of values that appear so frequently as to be considered skewed.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-skewedinfo.html#cfn-glue-partition-skewedinfo-skewedcolumnvalues

Return type

Optional[List[str]]

StorageDescriptorProperty

class CfnPartition.StorageDescriptorProperty(*, bucket_columns=None, columns=None, compressed=None, input_format=None, location=None, number_of_buckets=None, output_format=None, parameters=None, schema_reference=None, serde_info=None, skewed_info=None, sort_columns=None, stored_as_sub_directories=None)

Bases: object

Describes the physical storage of table data.

Parameters
  • bucket_columns (Optional[Sequence[str]]) – A list of reducer grouping columns, clustering columns, and bucketing columns in the table.

  • columns (Union[IResolvable, Sequence[Union[IResolvable, ColumnProperty]], None]) – A list of the Columns in the table.

  • compressed (Union[bool, IResolvable, None]) – True if the data in the table is compressed, or False if not.

  • input_format (Optional[str]) – The input format: SequenceFileInputFormat (binary), or TextInputFormat , or a custom format.

  • location (Optional[str]) – The physical location of the table. By default, this takes the form of the warehouse location, followed by the database location in the warehouse, followed by the table name.

  • number_of_buckets (Union[int, float, None]) – The number of buckets. You must specify this property if the partition contains any dimension columns.

  • output_format (Optional[str]) – The output format: SequenceFileOutputFormat (binary), or IgnoreKeyTextOutputFormat , or a custom format.

  • parameters (Optional[Any]) – The user-supplied properties in key-value form.

  • schema_reference (Union[IResolvable, SchemaReferenceProperty, None]) – An object that references a schema stored in the AWS Glue Schema Registry.

  • serde_info (Union[IResolvable, SerdeInfoProperty, None]) – The serialization/deserialization (SerDe) information.

  • skewed_info (Union[IResolvable, SkewedInfoProperty, None]) – The information about values that appear frequently in a column (skewed values).

  • sort_columns (Union[IResolvable, Sequence[Union[IResolvable, OrderProperty]], None]) – A list specifying the sort order of each bucket in the table.

  • stored_as_sub_directories (Union[bool, IResolvable, None]) – True if the table data is stored in subdirectories, or False if not.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_glue as glue

# parameters: Any
# skewed_column_value_location_maps: Any

storage_descriptor_property = 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
)

Attributes

bucket_columns

A list of reducer grouping columns, clustering columns, and bucketing columns in the table.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-bucketcolumns

Return type

Optional[List[str]]

columns

A list of the Columns in the table.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-columns

Return type

Union[IResolvable, List[Union[IResolvable, ColumnProperty]], None]

compressed

True if the data in the table is compressed, or False if not.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-compressed

Return type

Union[bool, IResolvable, None]

input_format

SequenceFileInputFormat (binary), or TextInputFormat , or a custom format.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-inputformat

Type

The input format

Return type

Optional[str]

location

The physical location of the table.

By default, this takes the form of the warehouse location, followed by the database location in the warehouse, followed by the table name.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-location

Return type

Optional[str]

number_of_buckets

The number of buckets.

You must specify this property if the partition contains any dimension columns.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-numberofbuckets

Return type

Union[int, float, None]

output_format

SequenceFileOutputFormat (binary), or IgnoreKeyTextOutputFormat , or a custom format.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-outputformat

Type

The output format

Return type

Optional[str]

parameters

The user-supplied properties in key-value form.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-parameters

Return type

Any

schema_reference

An object that references a schema stored in the AWS Glue Schema Registry.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-schemareference

Return type

Union[IResolvable, SchemaReferenceProperty, None]

serde_info

The serialization/deserialization (SerDe) information.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-serdeinfo

Return type

Union[IResolvable, SerdeInfoProperty, None]

skewed_info

The information about values that appear frequently in a column (skewed values).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-skewedinfo

Return type

Union[IResolvable, SkewedInfoProperty, None]

sort_columns

A list specifying the sort order of each bucket in the table.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-sortcolumns

Return type

Union[IResolvable, List[Union[IResolvable, OrderProperty]], None]

stored_as_sub_directories

True if the table data is stored in subdirectories, or False if not.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-storagedescriptor.html#cfn-glue-partition-storagedescriptor-storedassubdirectories

Return type

Union[bool, IResolvable, None]