Skip to main content

partition_indexes

Creates, updates, deletes, gets or lists a partition_indexes resource.

Overview

Namepartition_indexes
TypeResource
Idaws.glue.partition_indexes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
backfill_errorsarrayA list of errors that can occur when registering partition indexes for an existing table.
index_namestringThe name of the partition index. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>)
index_statusstringThe 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. (CREATING, ACTIVE, DELETING, FAILED)
keysarrayA list of one or more keys, as KeySchemaElement structures, for the partition index.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_partition_indexesselectregionRetrieves the partition indexes associated with a table.
create_partition_indexinsertregion, DatabaseName, TableName, PartitionIndexCreates a specified partition index in an existing table.
delete_partition_indexdeleteregionDeletes a specified partition index from an existing table.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves the partition indexes associated with a table.

SELECT
backfill_errors,
index_name,
index_status,
keys
FROM aws.glue.partition_indexes
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a specified partition index in an existing table.

INSERT INTO aws.glue.partition_indexes (
CatalogId,
DatabaseName,
TableName,
PartitionIndex,
region
)
SELECT
'{{ CatalogId }}',
'{{ DatabaseName }}' /* required */,
'{{ TableName }}' /* required */,
'{{ PartitionIndex }}' /* required */,
'{{ region }}'
;

DELETE examples

Deletes a specified partition index from an existing table.

DELETE FROM aws.glue.partition_indexes
WHERE region = '{{ region }}' --required
;