column_statistics_task_settings
Creates, updates, deletes, gets or lists a column_statistics_task_settings resource.
Overview
| Name | column_statistics_task_settings |
| Type | Resource |
| Id | aws.glue.column_statistics_task_settings |
Fields
The following fields are returned by SELECT queries:
- get_column_statistics_task_settings
| Name | Datatype | Description |
|---|---|---|
catalog_id | string | The ID of the Data Catalog in which the database resides. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>) |
column_name_list | array | A list of column names for which to run statistics. |
database_name | string | The name of the database where the table resides. |
last_execution_attempt | object | The last ExecutionAttempt for the column statistics task run. |
role | string | The role used for running the column statistics. |
sample_size | number (double) | The percentage of data to sample. |
schedule | object | A schedule for running the column statistics, specified in CRON syntax. |
schedule_type | string | The type of schedule for a column statistics task. Possible values may be CRON or AUTO. (CRON, AUTO) |
security_configuration | string | Name of the security configuration that is used to encrypt CloudWatch logs. |
setting_source | string | The source of setting the column statistics task. Possible values may be CATALOG or TABLE. (CATALOG, TABLE) |
table_name | string | The name of the table for which to generate column statistics. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_column_statistics_task_settings | select | region | Gets settings for a column statistics task. | |
create_column_statistics_task_settings | insert | region, DatabaseName, TableName, Role | Creates settings for a column statistics task. | |
update_column_statistics_task_settings | update | region, DatabaseName, TableName | Updates settings for a column statistics task. | |
delete_column_statistics_task_settings | delete | region | Deletes settings for a column statistics task. |
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_column_statistics_task_settings
Gets settings for a column statistics task.
SELECT
catalog_id,
column_name_list,
database_name,
last_execution_attempt,
role,
sample_size,
schedule,
schedule_type,
security_configuration,
setting_source,
table_name
FROM aws.glue.column_statistics_task_settings
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_column_statistics_task_settings
- Manifest
Creates settings for a column statistics task.
INSERT INTO aws.glue.column_statistics_task_settings (
DatabaseName,
TableName,
Role,
Schedule,
ColumnNameList,
SampleSize,
CatalogID,
SecurityConfiguration,
Tags,
region
)
SELECT
'{{ DatabaseName }}' /* required */,
'{{ TableName }}' /* required */,
'{{ Role }}' /* required */,
'{{ Schedule }}',
'{{ ColumnNameList }}',
{{ SampleSize }},
'{{ CatalogID }}',
'{{ SecurityConfiguration }}',
'{{ Tags }}',
'{{ region }}'
;
# Description fields are for documentation purposes
- name: column_statistics_task_settings
props:
- name: region
value: "{{ region }}"
description: Required parameter for the column_statistics_task_settings resource.
- name: DatabaseName
value: "{{ DatabaseName }}"
description: |
The name of the database where the table resides.
- name: TableName
value: "{{ TableName }}"
description: |
The name of the table for which to generate column statistics.
- name: Role
value: "{{ Role }}"
description: |
The role used for running the column statistics.
- name: Schedule
value: "{{ Schedule }}"
description: |
A schedule for running the column statistics, specified in CRON syntax.
- name: ColumnNameList
value:
- "{{ ColumnNameList }}"
description: |
A list of column names for which to run statistics.
- name: SampleSize
value: {{ SampleSize }}
description: |
The percentage of data to sample.
- name: CatalogID
value: "{{ CatalogID }}"
description: |
The ID of the Data Catalog in which the database resides.
- name: SecurityConfiguration
value: "{{ SecurityConfiguration }}"
description: |
Name of the security configuration that is used to encrypt CloudWatch logs.
- name: Tags
value: "{{ Tags }}"
description: |
A map of tags.
UPDATE examples
- update_column_statistics_task_settings
Updates settings for a column statistics task.
UPDATE aws.glue.column_statistics_task_settings
SET
DatabaseName = '{{ DatabaseName }}',
TableName = '{{ TableName }}',
Role = '{{ Role }}',
Schedule = '{{ Schedule }}',
ColumnNameList = '{{ ColumnNameList }}',
SampleSize = {{ SampleSize }},
CatalogID = '{{ CatalogID }}',
SecurityConfiguration = '{{ SecurityConfiguration }}'
WHERE
region = '{{ region }}' --required
AND DatabaseName = '{{ DatabaseName }}' --required
AND TableName = '{{ TableName }}' --required;
DELETE examples
- delete_column_statistics_task_settings
Deletes settings for a column statistics task.
DELETE FROM aws.glue.column_statistics_task_settings
WHERE region = '{{ region }}' --required
;