partition_indexes
Creates, updates, deletes, gets or lists a partition_indexes resource.
Overview
| Name | partition_indexes |
| Type | Resource |
| Id | aws.glue.partition_indexes |
Fields
The following fields are returned by SELECT queries:
- get_partition_indexes
| Name | Datatype | Description |
|---|---|---|
backfill_errors | array | A list of errors that can occur when registering partition indexes for an existing table. |
index_name | string | The name of the partition index. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>) |
index_status | string | 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. (CREATING, ACTIVE, DELETING, FAILED) |
keys | array | A list of one or more keys, as KeySchemaElement structures, for the partition index. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_partition_indexes | select | region | Retrieves the partition indexes associated with a table. | |
create_partition_index | insert | region, DatabaseName, TableName, PartitionIndex | Creates a specified partition index in an existing table. | |
delete_partition_index | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_partition_indexes
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
- create_partition_index
- Manifest
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 }}'
;
# Description fields are for documentation purposes
- name: partition_indexes
props:
- name: region
value: "{{ region }}"
description: Required parameter for the partition_indexes resource.
- name: CatalogId
value: "{{ CatalogId }}"
description: |
The catalog ID where the table resides.
- name: DatabaseName
value: "{{ DatabaseName }}"
description: |
Specifies the name of a database in which you want to create a partition index.
- name: TableName
value: "{{ TableName }}"
description: |
Specifies the name of a table in which you want to create a partition index.
- name: PartitionIndex
description: |
Specifies a PartitionIndex structure to create a partition index in an existing table.
value:
Keys:
- "{{ Keys }}"
IndexName: "{{ IndexName }}"
DELETE examples
- delete_partition_index
Deletes a specified partition index from an existing table.
DELETE FROM aws.glue.partition_indexes
WHERE region = '{{ region }}' --required
;