Skip to main content

table_optimizers

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

Overview

Nametable_optimizers
TypeResource
Idaws.glue.table_optimizers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
catalog_idstringThe Catalog ID of the table. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>)
database_namestringThe name of the database in the catalog in which the table resides. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>)
table_namestringThe name of the table. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>)
table_optimizerobjectThe optimizer associated with the specified table.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_table_optimizerselectregionReturns the configuration of all optimizers associated with a specified table.
batch_get_table_optimizerselectregionReturns the configuration for the specified table optimizers.
create_table_optimizerinsertregion, CatalogId, DatabaseName, TableName, Type, TableOptimizerConfigurationCreates a new table optimizer for a specific function.
update_table_optimizerupdateregion, CatalogId, DatabaseName, TableName, Type, TableOptimizerConfigurationUpdates the configuration for an existing table optimizer.
delete_table_optimizerdeleteregionDeletes an optimizer and all associated metadata for a table. The optimization will no longer be performed on the 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

Returns the configuration of all optimizers associated with a specified table.

SELECT
catalog_id,
database_name,
table_name,
table_optimizer
FROM aws.glue.table_optimizers
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new table optimizer for a specific function.

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

UPDATE examples

Updates the configuration for an existing table optimizer.

UPDATE aws.glue.table_optimizers
SET
CatalogId = '{{ CatalogId }}',
DatabaseName = '{{ DatabaseName }}',
TableName = '{{ TableName }}',
Type = '{{ Type }}',
TableOptimizerConfiguration = '{{ TableOptimizerConfiguration }}'
WHERE
region = '{{ region }}' --required
AND CatalogId = '{{ CatalogId }}' --required
AND DatabaseName = '{{ DatabaseName }}' --required
AND TableName = '{{ TableName }}' --required
AND Type = '{{ Type }}' --required
AND TableOptimizerConfiguration = '{{ TableOptimizerConfiguration }}' --required;

DELETE examples

Deletes an optimizer and all associated metadata for a table. The optimization will no longer be performed on the table.

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