Table API
The Table API describes data types and operations associated with tables.
Data types
Table structure
Represents a collection of related data organized in columns and rows.
Fields
-
Name
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The table name. For Hive compatibility, this must be entirely lowercase.
-
DatabaseName
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the database where the table metadata resides. For Hive compatibility, this must be all lowercase.
-
Description
– Description string, not more than 2048 bytes long, matching the URI address multi-line string pattern.A description of the table.
-
Owner
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The owner of the table.
-
CreateTime
– Timestamp.The time when the table definition was created in the Data Catalog.
-
UpdateTime
– Timestamp.The last time that the table was updated.
-
LastAccessTime
– Timestamp.The last time that the table was accessed. This is usually taken from HDFS, and might not be reliable.
-
LastAnalyzedTime
– Timestamp.The last time that column statistics were computed for this table.
-
Retention
– Number (integer), not more than None.The retention time for this table.
-
StorageDescriptor
– A StorageDescriptor object.A storage descriptor containing information about the physical storage of this table.
-
PartitionKeys
– An array of Column objects.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 ofpartitionKeys
to an empty list. For example:"PartitionKeys": []
-
ViewOriginalText
– UTF-8 string, not more than 409600 bytes long.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. -
ViewExpandedText
– UTF-8 string, not more than 409600 bytes long.Included for Apache Hive compatibility. Not used in the normal course of AWS Glue operations.
-
TableType
– UTF-8 string, not more than 255 bytes long.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
.
-
Parameters
– A map array of key-value pairs.Each key is a Key string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.
Each value is a UTF-8 string, not more than 512000 bytes long.
These key-value pairs define properties associated with the table.
-
CreatedBy
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The person or entity who created the table.
-
IsRegisteredWithLakeFormation
– Boolean.Indicates whether the table has been registered with AWS Lake Formation.
-
TargetTable
– A TableIdentifier object.A
TableIdentifier
structure that describes a target table for resource linking. -
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog in which the table resides.
-
VersionId
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the table version.
-
FederatedTable
– A FederatedTable object.A
FederatedTable
structure that references an entity outside the AWS Glue Data Catalog. -
ViewDefinition
– A ViewDefinition object.A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.
-
IsMultiDialectView
– Boolean.Specifies whether the view supports the SQL dialects of one or more different query engines and can therefore be read by those engines.
TableInput structure
A structure used to define a table.
Fields
-
Name
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The table name. For Hive compatibility, this is folded to lowercase when it is stored.
-
Description
– Description string, not more than 2048 bytes long, matching the URI address multi-line string pattern.A description of the table.
-
Owner
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The table owner. Included for Apache Hive compatibility. Not used in the normal course of AWS Glue operations.
-
LastAccessTime
– Timestamp.The last time that the table was accessed.
-
LastAnalyzedTime
– Timestamp.The last time that column statistics were computed for this table.
-
Retention
– Number (integer), not more than None.The retention time for this table.
-
StorageDescriptor
– A StorageDescriptor object.A storage descriptor containing information about the physical storage of this table.
-
PartitionKeys
– An array of Column objects.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 ofpartitionKeys
to an empty list. For example:"PartitionKeys": []
-
ViewOriginalText
– UTF-8 string, not more than 409600 bytes long.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. -
ViewExpandedText
– UTF-8 string, not more than 409600 bytes long.Included for Apache Hive compatibility. Not used in the normal course of AWS Glue operations.
-
TableType
– UTF-8 string, not more than 255 bytes long.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
.
-
Parameters
– A map array of key-value pairs.Each key is a Key string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.
Each value is a UTF-8 string, not more than 512000 bytes long.
These key-value pairs define properties associated with the table.
-
TargetTable
– A TableIdentifier object.A
TableIdentifier
structure that describes a target table for resource linking. -
ViewDefinition
– A ViewDefinitionInput object.A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.
FederatedTable structure
A table that points to an entity outside the AWS Glue Data Catalog.
Fields
-
Identifier
– UTF-8 string, not less than 1 or more than 512 bytes long, matching the Single-line string pattern.A unique identifier for the federated table.
-
DatabaseIdentifier
– UTF-8 string, not less than 1 or more than 512 bytes long, matching the Single-line string pattern.A unique identifier for the federated database.
-
ConnectionName
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the connection to the external metastore.
Column structure
A column in a Table
.
Fields
-
Name
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the
Column
. -
Type
– UTF-8 string, not more than 131072 bytes long, matching the Single-line string pattern.The data type of the
Column
. -
Comment
– Comment string, not more than 255 bytes long, matching the Single-line string pattern.A free-form text comment.
-
Parameters
– A map array of key-value pairs.Each key is a Key string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.
Each value is a UTF-8 string, not more than 512000 bytes long.
These key-value pairs define properties associated with the column.
StorageDescriptor structure
Describes the physical storage of table data.
Fields
-
Columns
– An array of Column objects.A list of the
Columns
in the table. -
Location
– Location string, not more than 2056 bytes long, matching the URI address multi-line string pattern.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.
-
AdditionalLocations
– An array of UTF-8 strings.A list of locations that point to the path where a Delta table is located.
-
InputFormat
– Format string, not more than 128 bytes long, matching the Single-line string pattern.The input format:
SequenceFileInputFormat
(binary), orTextInputFormat
, or a custom format. -
OutputFormat
– Format string, not more than 128 bytes long, matching the Single-line string pattern.The output format:
SequenceFileOutputFormat
(binary), orIgnoreKeyTextOutputFormat
, or a custom format. -
Compressed
– Boolean.True
if the data in the table is compressed, orFalse
if not. -
NumberOfBuckets
– Number (integer).Must be specified if the table contains any dimension columns.
-
SerdeInfo
– A SerDeInfo object.The serialization/deserialization (SerDe) information.
-
BucketColumns
– An array of UTF-8 strings.A list of reducer grouping columns, clustering columns, and bucketing columns in the table.
-
SortColumns
– An array of Order objects.A list specifying the sort order of each bucket in the table.
-
Parameters
– A map array of key-value pairs.Each key is a Key string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.
Each value is a UTF-8 string, not more than 512000 bytes long.
The user-supplied properties in key-value form.
-
SkewedInfo
– A SkewedInfo object.The information about values that appear frequently in a column (skewed values).
-
StoredAsSubDirectories
– Boolean.True
if the table data is stored in subdirectories, orFalse
if not. -
SchemaReference
– A SchemaReference object.An object that references a schema stored in the AWS Glue Schema Registry.
When creating a table, you can pass an empty list of columns for the schema, and instead use a schema reference.
SchemaReference structure
An object that references a schema stored in the AWS Glue Schema Registry.
Fields
-
SchemaId
– A SchemaId object.A structure that contains schema identity fields. Either this or the
SchemaVersionId
has to be provided. -
SchemaVersionId
– UTF-8 string, not less than 36 or more than 36 bytes long, matching the Custom string pattern #17.The unique ID assigned to a version of the schema. Either this or the
SchemaId
has to be provided. -
SchemaVersionNumber
– Number (long), not less than 1 or more than 100000.The version number of the schema.
SerDeInfo structure
Information about a serialization/deserialization program (SerDe) that serves as an extractor and loader.
Fields
-
Name
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.Name of the SerDe.
-
SerializationLibrary
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.Usually the class that implements the SerDe. An example is
org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe
. -
Parameters
– A map array of key-value pairs.Each key is a Key string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.
Each value is a UTF-8 string, not more than 512000 bytes long.
These key-value pairs define initialization parameters for the SerDe.
Order structure
Specifies the sort order of a sorted column.
Fields
-
Column
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the column.
-
SortOrder
– Required: Number (integer), not more than 1.Indicates that the column is sorted in ascending order (
== 1
), or in descending order (==0
).
SkewedInfo structure
Specifies skewed values in a table. Skewed values are those that occur with very high frequency.
Fields
-
SkewedColumnNames
– An array of UTF-8 strings.A list of names of columns that contain skewed values.
-
SkewedColumnValues
– An array of UTF-8 strings.A list of values that appear so frequently as to be considered skewed.
-
SkewedColumnValueLocationMaps
– A map array of key-value pairs.Each key is a UTF-8 string.
Each value is a UTF-8 string.
A mapping of skewed values to the columns that contain them.
TableVersion structure
Specifies a version of a table.
Fields
-
Table
– A Table object.The table in question.
-
VersionId
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID value that identifies this table version. A
VersionId
is a string representation of an integer. Each version is incremented by 1.
TableError structure
An error record for table operations.
Fields
-
TableName
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the table. For Hive compatibility, this must be entirely lowercase.
-
ErrorDetail
– An ErrorDetail object.The details about the error.
TableVersionError structure
An error record for table-version operations.
Fields
-
TableName
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the table in question.
-
VersionId
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID value of the version in question. A
VersionID
is a string representation of an integer. Each version is incremented by 1. -
ErrorDetail
– An ErrorDetail object.The details about the error.
SortCriterion structure
Specifies a field to sort by and a sort order.
Fields
-
FieldName
– Value string, not more than 1024 bytes long.The name of the field on which to sort.
-
Sort
– UTF-8 string (valid values:ASC="ASCENDING"
|DESC="DESCENDING"
).An ascending or descending sort.
TableIdentifier structure
A structure that describes a target table for resource linking.
Fields
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog in which the table resides.
-
DatabaseName
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the catalog database that contains the target table.
-
Name
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the target table.
-
Region
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.Region of the target table.
KeySchemaElement structure
A partition key pair consisting of a name and a type.
Fields
-
Name
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of a partition key.
-
Type
– Required: UTF-8 string, not more than 131072 bytes long, matching the Single-line string pattern.The type of a partition key.
PartitionIndex structure
A structure for a partition index.
Fields
-
Keys
– Required: An array of UTF-8 strings, at least 1 string.The keys for the partition index.
-
IndexName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the partition index.
PartitionIndexDescriptor structure
A descriptor for a partition index in a table.
Fields
-
IndexName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the partition index.
-
Keys
– Required: An array of KeySchemaElement objects, at least 1 structure.A list of one or more keys, as
KeySchemaElement
structures, for the partition index. -
IndexStatus
– Required: UTF-8 string (valid values:CREATING
|ACTIVE
|DELETING
|FAILED
).The status of the partition index.
The possible statuses are:
-
CREATING: The index is being created. When an index is in a CREATING state, the index or its table cannot be deleted.
-
ACTIVE: The index creation succeeds.
-
FAILED: The index creation fails.
-
DELETING: The index is deleted from the list of indexes.
-
-
BackfillErrors
– An array of BackfillError objects.A list of errors that can occur when registering partition indexes for an existing table.
BackfillError structure
A list of errors that can occur when registering partition indexes for an existing table.
These errors give the details about why an index registration failed and provide a limited number of partitions in the response, so that you can fix the partitions at fault and try registering the index again. The most common set of errors that can occur are categorized as follows:
-
EncryptedPartitionError: The partitions are encrypted.
-
InvalidPartitionTypeDataError: The partition value doesn't match the data type for that partition column.
-
MissingPartitionValueError: The partitions are encrypted.
-
UnsupportedPartitionCharacterError: Characters inside the partition value are not supported. For example: U+0000 , U+0001, U+0002.
-
InternalError: Any error which does not belong to other error codes.
Fields
-
Code
– UTF-8 string (valid values:ENCRYPTED_PARTITION_ERROR
|INTERNAL_ERROR
|INVALID_PARTITION_TYPE_DATA_ERROR
|MISSING_PARTITION_VALUE_ERROR
|UNSUPPORTED_PARTITION_CHARACTER_ERROR
).The error code for an error that occurred when registering partition indexes for an existing table.
-
Partitions
– An array of PartitionValueList objects.A list of a limited number of partitions in the response.
IcebergInput structure
A structure that defines an Apache Iceberg metadata table to create in the catalog.
Fields
-
MetadataOperation
– Required: UTF-8 string (valid values:CREATE
).A required metadata operation. Can only be set to
CREATE
. -
Version
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The table version for the Iceberg table. Defaults to 2.
OpenTableFormatInput structure
A structure representing an open format table.
Fields
-
IcebergInput
– An IcebergInput object.Specifies an
IcebergInput
structure that defines an Apache Iceberg metadata table.
ViewDefinition structure
A structure containing details for representations.
Fields
-
IsProtected
– Boolean.You can set this flag as true to instruct the engine not to push user-provided operations into the logical plan of the view during query planning. However, setting this flag does not guarantee that the engine will comply. Refer to the engine's documentation to understand the guarantees provided, if any.
-
Definer
– UTF-8 string, not less than 1 or more than 512 bytes long, matching the Single-line string pattern.The definer of a view in SQL.
-
SubObjects
– An array of UTF-8 strings, not more than 10 strings.A list of table Amazon Resource Names (ARNs).
-
Representations
– An array of ViewRepresentation objects, not less than 1 or more than 1000 structures.A list of representations.
ViewDefinitionInput structure
A structure containing details for creating or updating an AWS Glue view.
Fields
-
IsProtected
– Boolean.You can set this flag as true to instruct the engine not to push user-provided operations into the logical plan of the view during query planning. However, setting this flag does not guarantee that the engine will comply. Refer to the engine's documentation to understand the guarantees provided, if any.
-
Definer
– UTF-8 string, not less than 1 or more than 512 bytes long, matching the Single-line string pattern.The definer of a view in SQL.
-
Representations
– An array of ViewRepresentationInput objects, not less than 1 or more than 10 structures.A list of structures that contains the dialect of the view, and the query that defines the view.
-
SubObjects
– An array of UTF-8 strings, not more than 10 strings.A list of base table ARNs that make up the view.
ViewRepresentation structure
A structure that contains the dialect of the view, and the query that defines the view.
Fields
-
Dialect
– UTF-8 string (valid values:REDSHIFT
|ATHENA
|SPARK
).The dialect of the query engine.
-
DialectVersion
– UTF-8 string, not less than 1 or more than 255 bytes long.The version of the dialect of the query engine. For example, 3.0.0.
-
ViewOriginalText
– UTF-8 string, not more than 409600 bytes long.The
SELECT
query provided by the customer duringCREATE VIEW DDL
. This SQL is not used during a query on a view (ViewExpandedText
is used instead).ViewOriginalText
is used for cases likeSHOW CREATE VIEW
where users want to see the original DDL command that created the view. -
ViewExpandedText
– UTF-8 string, not more than 409600 bytes long.The expanded SQL for the view. This SQL is used by engines while processing a query on a view. Engines may perform operations during view creation to transform
ViewOriginalText
toViewExpandedText
. For example:-
Fully qualified identifiers:
SELECT * from table1 -> SELECT * from db1.table1
-
-
ValidationConnection
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the connection to be used to validate the specific representation of the view.
-
IsStale
– Boolean.Dialects marked as stale are no longer valid and must be updated before they can be queried in their respective query engines.
ViewRepresentationInput structure
A structure containing details of a representation to update or create a Lake Formation view.
Fields
-
Dialect
– UTF-8 string (valid values:REDSHIFT
|ATHENA
|SPARK
).A parameter that specifies the engine type of a specific representation.
-
DialectVersion
– UTF-8 string, not less than 1 or more than 255 bytes long.A parameter that specifies the version of the engine of a specific representation.
-
ViewOriginalText
– UTF-8 string, not more than 409600 bytes long.A string that represents the original SQL query that describes the view.
-
ValidationConnection
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the connection to be used to validate the specific representation of the view.
-
ViewExpandedText
– UTF-8 string, not more than 409600 bytes long.A string that represents the SQL query that describes the view with expanded resource ARNs
Operations
BatchDeleteTableVersion action (Python: batch_delete_table_version)
CreatePartitionIndex action (Python: create_partition_index)
DeletePartitionIndex action (Python: delete_partition_index)
GetColumnStatisticsForTable action (Python: get_column_statistics_for_table)
UpdateColumnStatisticsForTable action (Python: update_column_statistics_for_table)
DeleteColumnStatisticsForTable action (Python: delete_column_statistics_for_table)
CreateTable action (Python: create_table)
Creates a new table definition in the Data Catalog.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog in which to create the
Table
. If none is supplied, the AWS account ID is used by default. -
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The catalog database in which to create the new table. For Hive compatibility, this name is entirely lowercase.
-
TableInput
– Required: A TableInput object.The
TableInput
object that defines the metadata table to create in the catalog. -
PartitionIndexes
– An array of PartitionIndex objects, not more than 3 structures.A list of partition indexes,
PartitionIndex
structures, to create in the table. -
TransactionId
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Custom string pattern #16.The ID of the transaction.
-
OpenTableFormatInput
– An OpenTableFormatInput object.Specifies an
OpenTableFormatInput
structure when creating an open format table.
Response
No Response parameters.
Errors
AlreadyExistsException
InvalidInputException
EntityNotFoundException
ResourceNumberLimitExceededException
InternalServiceException
OperationTimeoutException
GlueEncryptionException
ConcurrentModificationException
ResourceNotReadyException
UpdateTable action (Python: update_table)
Updates a metadata table in the Data Catalog.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog where the table resides. If none is provided, the AWS account ID is used by default.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.
-
TableInput
– Required: A TableInput object.An updated
TableInput
object to define the metadata table in the catalog. -
SkipArchive
– Boolean.By default,
UpdateTable
always creates an archived version of the table before updating it. However, ifskipArchive
is set to true,UpdateTable
does not create the archived version. -
TransactionId
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Custom string pattern #16.The transaction ID at which to update the table contents.
-
VersionId
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The version ID at which to update the table contents.
-
ViewUpdateAction
– UTF-8 string (valid values:ADD
|REPLACE
|ADD_OR_REPLACE
|DROP
).The operation to be performed when updating the view.
-
Force
– Boolean.A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.
Response
No Response parameters.
Errors
EntityNotFoundException
InvalidInputException
InternalServiceException
OperationTimeoutException
ConcurrentModificationException
ResourceNumberLimitExceededException
GlueEncryptionException
ResourceNotReadyException
DeleteTable action (Python: delete_table)
Removes a table definition from the Data Catalog.
Note
After completing this operation, you no longer have access to the table versions and partitions that belong to the deleted table. AWS Glue deletes these "orphaned" resources asynchronously in a timely manner, at the discretion of the service.
To ensure the immediate deletion of all related resources, before calling
DeleteTable
, use DeleteTableVersion
or BatchDeleteTableVersion
,
and DeletePartition
or BatchDeletePartition
,
to delete any resources that belong to the table.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog where the table resides. If none is provided, the AWS account ID is used by default.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.
-
Name
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the table to be deleted. For Hive compatibility, this name is entirely lowercase.
-
TransactionId
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Custom string pattern #16.The transaction ID at which to delete the table contents.
Response
No Response parameters.
Errors
EntityNotFoundException
InvalidInputException
InternalServiceException
OperationTimeoutException
ConcurrentModificationException
ResourceNotReadyException
BatchDeleteTable action (Python: batch_delete_table)
Deletes multiple tables at once.
Note
After completing this operation, you no longer have access to the table versions and partitions that belong to the deleted table. AWS Glue deletes these "orphaned" resources asynchronously in a timely manner, at the discretion of the service.
To ensure the immediate deletion of all related resources, before calling
BatchDeleteTable
, use DeleteTableVersion
or
BatchDeleteTableVersion
, and DeletePartition
or BatchDeletePartition
, to delete any resources that belong
to the table.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog where the table resides. If none is provided, the AWS account ID is used by default.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the catalog database in which the tables to delete reside. For Hive compatibility, this name is entirely lowercase.
-
TablesToDelete
– Required: An array of UTF-8 strings, not more than 100 strings.A list of the table to delete.
-
TransactionId
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Custom string pattern #16.The transaction ID at which to delete the table contents.
Response
-
Errors
– An array of TableError objects.A list of errors encountered in attempting to delete the specified tables.
Errors
InvalidInputException
EntityNotFoundException
InternalServiceException
OperationTimeoutException
GlueEncryptionException
ResourceNotReadyException
GetTable action (Python: get_table)
Retrieves the Table
definition in a Data Catalog for a specified
table.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog where the table resides. If none is provided, the AWS account ID is used by default.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the database in the catalog in which the table resides. For Hive compatibility, this name is entirely lowercase.
-
Name
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the table for which to retrieve the definition. For Hive compatibility, this name is entirely lowercase.
-
TransactionId
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Custom string pattern #16.The transaction ID at which to read the table contents.
-
QueryAsOfTime
– Timestamp.The time as of when to read the table contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with
TransactionId
. -
IncludeStatusDetails
– Boolean.Specifies whether to include status details related to a request to create or update an AWS Glue Data Catalog view.
Response
-
Table
– A Table object.The
Table
object that defines the specified table.
Errors
EntityNotFoundException
InvalidInputException
InternalServiceException
OperationTimeoutException
GlueEncryptionException
ResourceNotReadyException
FederationSourceException
FederationSourceRetryableException
GetTables action (Python: get_tables)
Retrieves the definitions of some or all of the tables in a given Database
.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog where the tables reside. If none is provided, the AWS account ID is used by default.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The database in the catalog whose tables to list. For Hive compatibility, this name is entirely lowercase.
-
Expression
– UTF-8 string, not more than 2048 bytes long, matching the Single-line string pattern.A regular expression pattern. If present, only those tables whose names match the pattern are returned.
-
NextToken
– UTF-8 string.A continuation token, included if this is a continuation call.
-
MaxResults
– Number (integer), not less than 1 or more than 100.The maximum number of tables to return in a single response.
-
TransactionId
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Custom string pattern #16.The transaction ID at which to read the table contents.
-
QueryAsOfTime
– Timestamp.The time as of when to read the table contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with
TransactionId
. -
IncludeStatusDetails
– Boolean.Specifies whether to include status details related to a request to create or update an AWS Glue Data Catalog view.
-
AttributesToGet
– An array of UTF-8 strings.Specifies the table fields returned by the
GetTables
call. This parameter doesn't accept an empty list. The request must includeNAME
.The following are the valid combinations of values:
-
NAME
- Names of all tables in the database. -
NAME
,TABLE_TYPE
- Names of all tables and the table types.
-
Response
-
TableList
– An array of Table objects.A list of the requested
Table
objects. -
NextToken
– UTF-8 string.A continuation token, present if the current list segment is not the last.
Errors
EntityNotFoundException
InvalidInputException
OperationTimeoutException
InternalServiceException
GlueEncryptionException
FederationSourceException
FederationSourceRetryableException
GetTableVersion action (Python: get_table_version)
Retrieves a specified version of a table.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog where the tables reside. If none is provided, the AWS account ID is used by default.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The database in the catalog in which the table resides. For Hive compatibility, this name is entirely lowercase.
-
TableName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the table. For Hive compatibility, this name is entirely lowercase.
-
VersionId
– UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID value of the table version to be retrieved. A
VersionID
is a string representation of an integer. Each version is incremented by 1.
Response
-
TableVersion
– A TableVersion object.The requested table version.
Errors
EntityNotFoundException
InvalidInputException
InternalServiceException
OperationTimeoutException
GlueEncryptionException
GetTableVersions action (Python: get_table_versions)
Retrieves a list of strings that identify available versions of a specified table.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog where the tables reside. If none is provided, the AWS account ID is used by default.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The database in the catalog in which the table resides. For Hive compatibility, this name is entirely lowercase.
-
TableName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the table. For Hive compatibility, this name is entirely lowercase.
-
NextToken
– UTF-8 string.A continuation token, if this is not the first call.
-
MaxResults
– Number (integer), not less than 1 or more than 100.The maximum number of table versions to return in one response.
Response
-
TableVersions
– An array of TableVersion objects.A list of strings identifying available versions of the specified table.
-
NextToken
– UTF-8 string.A continuation token, if the list of available versions does not include the last one.
Errors
EntityNotFoundException
InvalidInputException
InternalServiceException
OperationTimeoutException
GlueEncryptionException
DeleteTableVersion action (Python: delete_table_version)
Deletes a specified version of a table.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog where the tables reside. If none is provided, the AWS account ID is used by default.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The database in the catalog in which the table resides. For Hive compatibility, this name is entirely lowercase.
-
TableName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the table. For Hive compatibility, this name is entirely lowercase.
-
VersionId
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the table version to be deleted. A
VersionID
is a string representation of an integer. Each version is incremented by 1.
Response
No Response parameters.
Errors
EntityNotFoundException
InvalidInputException
InternalServiceException
OperationTimeoutException
BatchDeleteTableVersion action (Python: batch_delete_table_version)
Deletes a specified batch of versions of a table.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog where the tables reside. If none is provided, the AWS account ID is used by default.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The database in the catalog in which the table resides. For Hive compatibility, this name is entirely lowercase.
-
TableName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the table. For Hive compatibility, this name is entirely lowercase.
-
VersionIds
– Required: An array of UTF-8 strings, not more than 100 strings.A list of the IDs of versions to be deleted. A
VersionId
is a string representation of an integer. Each version is incremented by 1.
Response
-
Errors
– An array of TableVersionError objects.A list of errors encountered while trying to delete the specified table versions.
Errors
EntityNotFoundException
InvalidInputException
InternalServiceException
OperationTimeoutException
SearchTables action (Python: search_tables)
Searches a set of tables based on properties in the table metadata as well as on the parent database. You can search against text or filter conditions.
You can only get tables that you have access to based on the security policies defined in Lake Formation. You need at least a read-only access to the table for it to be returned. If you do not have access to all the columns in the table, these columns will not be searched against when returning the list of tables back to you. If you have access to the columns but not the data in the columns, those columns and the associated metadata for those columns will be included in the search.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.A unique identifier, consisting of
account_id
. -
NextToken
– UTF-8 string.A continuation token, included if this is a continuation call.
-
Filters
– An array of PropertyPredicate objects.A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.
The
Comparator
member of thePropertyPredicate
struct is used only for time fields, and can be omitted for other field types. Also, when comparing string values, such as whenKey=Name
, a fuzzy match algorithm is used. TheKey
field (for example, the value of theName
field) is split on certain punctuation characters, for example, -, :, #, etc. into tokens. Then each token is exact-match compared with theValue
member ofPropertyPredicate
. For example, ifKey=Name
andValue=link
, tables namedcustomer-link
andxx-link-yy
are returned, butxxlinkyy
is not returned. -
SearchText
– Value string, not more than 1024 bytes long.A string used for a text search.
Specifying a value in quotes filters based on an exact match to the value.
-
SortCriteria
– An array of SortCriterion objects, not more than 1 structures.A list of criteria for sorting the results by a field name, in an ascending or descending order.
-
MaxResults
– Number (integer), not less than 1 or more than 1000.The maximum number of tables to return in a single response.
-
ResourceShareType
– UTF-8 string (valid values:FOREIGN
|ALL
|FEDERATED
).Allows you to specify that you want to search the tables shared with your account. The allowable values are
FOREIGN
orALL
.-
If set to
FOREIGN
, will search the tables shared with your account. -
If set to
ALL
, will search the tables shared with your account, as well as the tables in yor local account.
-
-
IncludeStatusDetails
– Boolean.Specifies whether to include status details related to a request to create or update an AWS Glue Data Catalog view.
Response
-
NextToken
– UTF-8 string.A continuation token, present if the current list segment is not the last.
-
TableList
– An array of Table objects.A list of the requested
Table
objects. TheSearchTables
response returns only the tables that you have access to.
Errors
InternalServiceException
InvalidInputException
OperationTimeoutException
GetPartitionIndexes action (Python: get_partition_indexes)
Retrieves the partition indexes associated with a table.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The catalog ID where the table resides.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.Specifies the name of a database from which you want to retrieve partition indexes.
-
TableName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.Specifies the name of a table for which you want to retrieve the partition indexes.
-
NextToken
– UTF-8 string.A continuation token, included if this is a continuation call.
Response
-
PartitionIndexDescriptorList
– An array of PartitionIndexDescriptor objects.A list of index descriptors.
-
NextToken
– UTF-8 string.A continuation token, present if the current list segment is not the last.
Errors
InternalServiceException
OperationTimeoutException
InvalidInputException
EntityNotFoundException
ConflictException
CreatePartitionIndex action (Python: create_partition_index)
Creates a specified partition index in an existing table.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The catalog ID where the table resides.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.Specifies the name of a database in which you want to create a partition index.
-
TableName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.Specifies the name of a table in which you want to create a partition index.
-
PartitionIndex
– Required: A PartitionIndex object.Specifies a
PartitionIndex
structure to create a partition index in an existing table.
Response
No Response parameters.
Errors
AlreadyExistsException
InvalidInputException
EntityNotFoundException
ResourceNumberLimitExceededException
InternalServiceException
OperationTimeoutException
GlueEncryptionException
DeletePartitionIndex action (Python: delete_partition_index)
Deletes a specified partition index from an existing table.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The catalog ID where the table resides.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.Specifies the name of a database from which you want to delete a partition index.
-
TableName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.Specifies the name of a table from which you want to delete a partition index.
-
IndexName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the partition index to be deleted.
Response
No Response parameters.
Errors
InternalServiceException
OperationTimeoutException
InvalidInputException
EntityNotFoundException
ConflictException
GlueEncryptionException
GetColumnStatisticsForTable action (Python: get_column_statistics_for_table)
Retrieves table statistics of columns.
The Identity and Access Management (IAM) permission required for this
operation is GetTable
.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog where the partitions in question reside. If none is supplied, the AWS account ID is used by default.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the catalog database where the partitions reside.
-
TableName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the partitions' table.
-
ColumnNames
– Required: An array of UTF-8 strings, not more than 100 strings.A list of the column names.
Response
-
ColumnStatisticsList
– An array of ColumnStatistics objects.List of ColumnStatistics.
-
Errors
– An array of ColumnError objects.List of ColumnStatistics that failed to be retrieved.
Errors
EntityNotFoundException
InvalidInputException
InternalServiceException
OperationTimeoutException
GlueEncryptionException
UpdateColumnStatisticsForTable action (Python: update_column_statistics_for_table)
Creates or updates table statistics of columns.
The Identity and Access Management (IAM) permission required for this
operation is UpdateTable
.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog where the partitions in question reside. If none is supplied, the AWS account ID is used by default.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the catalog database where the partitions reside.
-
TableName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the partitions' table.
-
ColumnStatisticsList
– Required: An array of ColumnStatistics objects, not more than 25 structures.A list of the column statistics.
Response
-
Errors
– An array of ColumnStatisticsError objects.List of ColumnStatisticsErrors.
Errors
EntityNotFoundException
InvalidInputException
InternalServiceException
OperationTimeoutException
GlueEncryptionException
DeleteColumnStatisticsForTable action (Python: delete_column_statistics_for_table)
Retrieves table statistics of columns.
The Identity and Access Management (IAM) permission required for this
operation is DeleteTable
.
Request
-
CatalogId
– Catalog id string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The ID of the Data Catalog where the partitions in question reside. If none is supplied, the AWS account ID is used by default.
-
DatabaseName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the catalog database where the partitions reside.
-
TableName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the partitions' table.
-
ColumnName
– Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.The name of the column.
Response
No Response parameters.
Errors
EntityNotFoundException
InvalidInputException
InternalServiceException
OperationTimeoutException
GlueEncryptionException