CfnTable

class aws_cdk.aws_glue.CfnTable(scope, id, *, catalog_id, database_name, table_input, open_table_format_input=None)

Bases: CfnResource

The AWS::Glue::Table resource specifies tabular data in the AWS Glue data catalog.

For more information, see Defining Tables in the AWS Glue Data Catalog and Table Structure in the AWS Glue Developer Guide .

See:

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

CloudformationResource:

AWS::Glue::Table

ExampleMetadata:

fixture=_generated

Example:

# 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_table = glue.CfnTable(self, "MyCfnTable",
    catalog_id="catalogId",
    database_name="databaseName",
    table_input=glue.CfnTable.TableInputProperty(
        description="description",
        name="name",
        owner="owner",
        parameters=parameters,
        partition_keys=[glue.CfnTable.ColumnProperty(
            name="name",

            # the properties below are optional
            comment="comment",
            type="type"
        )],
        retention=123,
        storage_descriptor=glue.CfnTable.StorageDescriptorProperty(
            bucket_columns=["bucketColumns"],
            columns=[glue.CfnTable.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.CfnTable.SchemaReferenceProperty(
                schema_id=glue.CfnTable.SchemaIdProperty(
                    registry_name="registryName",
                    schema_arn="schemaArn",
                    schema_name="schemaName"
                ),
                schema_version_id="schemaVersionId",
                schema_version_number=123
            ),
            serde_info=glue.CfnTable.SerdeInfoProperty(
                name="name",
                parameters=parameters,
                serialization_library="serializationLibrary"
            ),
            skewed_info=glue.CfnTable.SkewedInfoProperty(
                skewed_column_names=["skewedColumnNames"],
                skewed_column_value_location_maps=skewed_column_value_location_maps,
                skewed_column_values=["skewedColumnValues"]
            ),
            sort_columns=[glue.CfnTable.OrderProperty(
                column="column",
                sort_order=123
            )],
            stored_as_sub_directories=False
        ),
        table_type="tableType",
        target_table=glue.CfnTable.TableIdentifierProperty(
            catalog_id="catalogId",
            database_name="databaseName",
            name="name",
            region="region"
        ),
        view_expanded_text="viewExpandedText",
        view_original_text="viewOriginalText"
    ),

    # the properties below are optional
    open_table_format_input=glue.CfnTable.OpenTableFormatInputProperty(
        iceberg_input=glue.CfnTable.IcebergInputProperty(
            metadata_operation="metadataOperation",
            version="version"
        )
    )
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • catalog_id (str) – The ID of the Data Catalog in which to create the Table .

  • database_name (str) – The name of the database where the table metadata resides. For Hive compatibility, this must be all lowercase.

  • table_input (Union[IResolvable, TableInputProperty, Dict[str, Any]]) – A structure used to define a table.

  • open_table_format_input (Union[IResolvable, OpenTableFormatInputProperty, Dict[str, Any], None]) – Specifies an OpenTableFormatInput structure when creating an open format table.

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_dependency(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_depends_on(target)

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

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

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.

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 intermediate 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). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

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 resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

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.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

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.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

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

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
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::Table'
attr_id

Id

Type:

cloudformationAttribute

catalog_id

The ID of the Data Catalog in which to create the Table .

cfn_options

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

cfn_resource_type

AWS resource type.

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.

database_name

The name of the database where the table metadata resides.

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).

Returns:

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

node

The tree node.

open_table_format_input

Specifies an OpenTableFormatInput structure when creating an open format table.

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 }).

stack

The stack in which this element is defined.

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

table_input

A structure used to define a table.

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(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

ColumnProperty

class CfnTable.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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-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.
from aws_cdk import aws_glue as glue

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

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

Attributes

comment

A free-form text comment.

See:

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

name

The name of the Column .

See:

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

type

The data type of the Column .

See:

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

IcebergInputProperty

class CfnTable.IcebergInputProperty(*, metadata_operation=None, version=None)

Bases: object

Specifies an input structure that defines an Apache Iceberg metadata table.

Parameters:
  • metadata_operation (Optional[str]) – A required metadata operation. Can only be set to CREATE.

  • version (Optional[str]) – The table version for the Iceberg table. Defaults to 2.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-iceberginput.html

ExampleMetadata:

fixture=_generated

Example:

# 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

iceberg_input_property = glue.CfnTable.IcebergInputProperty(
    metadata_operation="metadataOperation",
    version="version"
)

Attributes

metadata_operation

A required metadata operation.

Can only be set to CREATE.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-iceberginput.html#cfn-glue-table-iceberginput-metadataoperation

version

The table version for the Iceberg table.

Defaults to 2.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-iceberginput.html#cfn-glue-table-iceberginput-version

OpenTableFormatInputProperty

class CfnTable.OpenTableFormatInputProperty(*, iceberg_input=None)

Bases: object

Specifies an OpenTableFormatInput structure when creating an open format table.

Parameters:

iceberg_input (Union[IResolvable, IcebergInputProperty, Dict[str, Any], None]) – Specifies an IcebergInput structure that defines an Apache Iceberg metadata table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-opentableformatinput.html

ExampleMetadata:

fixture=_generated

Example:

# 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

open_table_format_input_property = glue.CfnTable.OpenTableFormatInputProperty(
    iceberg_input=glue.CfnTable.IcebergInputProperty(
        metadata_operation="metadataOperation",
        version="version"
    )
)

Attributes

iceberg_input

Specifies an IcebergInput structure that defines an Apache Iceberg metadata table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-opentableformatinput.html#cfn-glue-table-opentableformatinput-iceberginput

OrderProperty

class CfnTable.OrderProperty(*, column, sort_order)

Bases: object

Specifies the sort order of a sorted column.

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

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-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.
from aws_cdk import aws_glue as glue

order_property = glue.CfnTable.OrderProperty(
    column="column",
    sort_order=123
)

Attributes

column

The name of the column.

See:

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

sort_order

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

See:

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

SchemaIdProperty

class CfnTable.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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-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.
from aws_cdk import aws_glue as glue

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

Attributes

registry_name

The name of the schema registry that contains the schema.

See:

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

schema_arn

The Amazon Resource Name (ARN) of the schema.

One of SchemaArn or SchemaName has to be provided.

See:

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

schema_name

The name of the schema.

One of SchemaArn or SchemaName has to be provided.

See:

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

SchemaReferenceProperty

class CfnTable.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, Dict[str, Any], 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-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.
from aws_cdk import aws_glue as glue

schema_reference_property = glue.CfnTable.SchemaReferenceProperty(
    schema_id=glue.CfnTable.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.

See:

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

schema_version_id

The unique ID assigned to a version of the schema.

Either this or the SchemaId has to be provided.

See:

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

schema_version_number

The version number of the schema.

See:

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

SerdeInfoProperty

class CfnTable.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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-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.
from aws_cdk import aws_glue as glue

# parameters: Any

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

Attributes

name

Name of the SerDe.

See:

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

parameters

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

See:

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

serialization_library

Usually the class that implements the SerDe.

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

See:

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

SkewedInfoProperty

class CfnTable.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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-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.
from aws_cdk import aws_glue as glue

# skewed_column_value_location_maps: Any

skewed_info_property = glue.CfnTable.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.

See:

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

skewed_column_value_location_maps

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

See:

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

skewed_column_values

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

See:

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

StorageDescriptorProperty

class CfnTable.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, Dict[str, Any]]], 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]) – Must be specified if the table 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, Dict[str, Any], None]) – An object that references a schema stored in the AWS Glue Schema Registry.

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

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

  • sort_columns (Union[IResolvable, Sequence[Union[IResolvable, OrderProperty, Dict[str, Any]]], 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-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.
from aws_cdk import aws_glue as glue

# parameters: Any
# skewed_column_value_location_maps: Any

storage_descriptor_property = glue.CfnTable.StorageDescriptorProperty(
    bucket_columns=["bucketColumns"],
    columns=[glue.CfnTable.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.CfnTable.SchemaReferenceProperty(
        schema_id=glue.CfnTable.SchemaIdProperty(
            registry_name="registryName",
            schema_arn="schemaArn",
            schema_name="schemaName"
        ),
        schema_version_id="schemaVersionId",
        schema_version_number=123
    ),
    serde_info=glue.CfnTable.SerdeInfoProperty(
        name="name",
        parameters=parameters,
        serialization_library="serializationLibrary"
    ),
    skewed_info=glue.CfnTable.SkewedInfoProperty(
        skewed_column_names=["skewedColumnNames"],
        skewed_column_value_location_maps=skewed_column_value_location_maps,
        skewed_column_values=["skewedColumnValues"]
    ),
    sort_columns=[glue.CfnTable.OrderProperty(
        column="column",
        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.

See:

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

columns

A list of the Columns in the table.

See:

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

compressed

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

See:

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

input_format

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

See:

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

Type:

The input format

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.

See:

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

number_of_buckets

Must be specified if the table contains any dimension columns.

See:

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

output_format

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

See:

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

Type:

The output format

parameters

The user-supplied properties in key-value form.

See:

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

schema_reference

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

See:

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

serde_info

The serialization/deserialization (SerDe) information.

See:

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

skewed_info

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

See:

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

sort_columns

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

See:

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

stored_as_sub_directories

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

See:

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

TableIdentifierProperty

class CfnTable.TableIdentifierProperty(*, catalog_id=None, database_name=None, name=None, region=None)

Bases: object

A structure that describes a target table for resource linking.

Parameters:
  • catalog_id (Optional[str]) – The ID of the Data Catalog in which the table resides.

  • database_name (Optional[str]) – The name of the catalog database that contains the target table.

  • name (Optional[str]) – The name of the target table.

  • region (Optional[str]) – The Region of the table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableidentifier.html

ExampleMetadata:

fixture=_generated

Example:

# 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

table_identifier_property = glue.CfnTable.TableIdentifierProperty(
    catalog_id="catalogId",
    database_name="databaseName",
    name="name",
    region="region"
)

Attributes

catalog_id

The ID of the Data Catalog in which the table resides.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableidentifier.html#cfn-glue-table-tableidentifier-catalogid

database_name

The name of the catalog database that contains the target table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableidentifier.html#cfn-glue-table-tableidentifier-databasename

name

The name of the target table.

See:

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

region

The Region of the table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableidentifier.html#cfn-glue-table-tableidentifier-region

TableInputProperty

class CfnTable.TableInputProperty(*, description=None, name=None, owner=None, parameters=None, partition_keys=None, retention=None, storage_descriptor=None, table_type=None, target_table=None, view_expanded_text=None, view_original_text=None)

Bases: object

A structure used to define a table.

Parameters:
  • description (Optional[str]) – A description of the table.

  • name (Optional[str]) – The table name. For Hive compatibility, this is folded to lowercase when it is stored.

  • owner (Optional[str]) – The table owner. Included for Apache Hive compatibility. Not used in the normal course of AWS Glue operations.

  • parameters (Optional[Any]) – These key-value pairs define properties associated with the table.

  • partition_keys (Union[IResolvable, Sequence[Union[IResolvable, ColumnProperty, Dict[str, Any]]], None]) – A list of columns by which the table is partitioned. Only primitive types are supported as partition keys. When you create a table used by Amazon Athena, and you do not specify any partitionKeys , you must at least set the value of partitionKeys to an empty list. For example: "PartitionKeys": []

  • retention (Union[int, float, None]) – The retention time for this table.

  • storage_descriptor (Union[IResolvable, StorageDescriptorProperty, Dict[str, Any], None]) – A storage descriptor containing information about the physical storage of this table.

  • table_type (Optional[str]) – The type of this table. AWS Glue will create tables with the EXTERNAL_TABLE type. Other services, such as Athena, may create tables with additional table types. AWS Glue related table types: - EXTERNAL_TABLE - Hive compatible attribute - indicates a non-Hive managed table. - GOVERNED - Used by AWS Lake Formation . The AWS Glue Data Catalog understands GOVERNED .

  • target_table (Union[IResolvable, TableIdentifierProperty, Dict[str, Any], None]) – A TableIdentifier structure that describes a target table for resource linking.

  • view_expanded_text (Optional[str]) – Included for Apache Hive compatibility. Not used in the normal course of AWS Glue operations.

  • view_original_text (Optional[str]) – Included for Apache Hive compatibility. Not used in the normal course of AWS Glue operations. If the table is a VIRTUAL_VIEW , certain Athena configuration encoded in base64.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html

ExampleMetadata:

fixture=_generated

Example:

# 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

table_input_property = glue.CfnTable.TableInputProperty(
    description="description",
    name="name",
    owner="owner",
    parameters=parameters,
    partition_keys=[glue.CfnTable.ColumnProperty(
        name="name",

        # the properties below are optional
        comment="comment",
        type="type"
    )],
    retention=123,
    storage_descriptor=glue.CfnTable.StorageDescriptorProperty(
        bucket_columns=["bucketColumns"],
        columns=[glue.CfnTable.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.CfnTable.SchemaReferenceProperty(
            schema_id=glue.CfnTable.SchemaIdProperty(
                registry_name="registryName",
                schema_arn="schemaArn",
                schema_name="schemaName"
            ),
            schema_version_id="schemaVersionId",
            schema_version_number=123
        ),
        serde_info=glue.CfnTable.SerdeInfoProperty(
            name="name",
            parameters=parameters,
            serialization_library="serializationLibrary"
        ),
        skewed_info=glue.CfnTable.SkewedInfoProperty(
            skewed_column_names=["skewedColumnNames"],
            skewed_column_value_location_maps=skewed_column_value_location_maps,
            skewed_column_values=["skewedColumnValues"]
        ),
        sort_columns=[glue.CfnTable.OrderProperty(
            column="column",
            sort_order=123
        )],
        stored_as_sub_directories=False
    ),
    table_type="tableType",
    target_table=glue.CfnTable.TableIdentifierProperty(
        catalog_id="catalogId",
        database_name="databaseName",
        name="name",
        region="region"
    ),
    view_expanded_text="viewExpandedText",
    view_original_text="viewOriginalText"
)

Attributes

description

A description of the table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-description

name

The table name.

For Hive compatibility, this is folded to lowercase when it is stored.

See:

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

owner

The table owner.

Included for Apache Hive compatibility. Not used in the normal course of AWS Glue operations.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-owner

parameters

These key-value pairs define properties associated with the table.

See:

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

partition_keys

A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.

When you create a table used by Amazon Athena, and you do not specify any partitionKeys , you must at least set the value of partitionKeys to an empty list. For example:

"PartitionKeys": []

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-partitionkeys

retention

The retention time for this table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-retention

storage_descriptor

A storage descriptor containing information about the physical storage of this table.

See:

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

table_type

The type of this table.

AWS Glue will create tables with the EXTERNAL_TABLE type. Other services, such as Athena, may create tables with additional table types.

AWS Glue related table types:

  • EXTERNAL_TABLE - Hive compatible attribute - indicates a non-Hive managed table.

  • GOVERNED - Used by AWS Lake Formation . The AWS Glue Data Catalog understands GOVERNED .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-tabletype

target_table

A TableIdentifier structure that describes a target table for resource linking.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-targettable

view_expanded_text

Included for Apache Hive compatibility.

Not used in the normal course of AWS Glue operations.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-viewexpandedtext

view_original_text

Included for Apache Hive compatibility.

Not used in the normal course of AWS Glue operations. If the table is a VIRTUAL_VIEW , certain Athena configuration encoded in base64.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-vieworiginaltext