batch_load_tasks
Creates, updates, deletes, gets or lists a batch_load_tasks resource.
Overview
| Name | batch_load_tasks |
| Type | Resource |
| Id | aws.timestream_write.batch_load_tasks |
Fields
The following fields are returned by SELECT queries:
- describe_batch_load_task
- list_batch_load_tasks
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The time when the Timestream batch load task was created. |
data_model_configuration | object | Data model configuration for a batch load task. This contains details about where a data model for a batch load task is stored. |
data_source_configuration | object | Configuration details about the data source for a batch load task. |
error_message | string | |
last_updated_time | string (date-time) | The time when the Timestream batch load task was last updated. |
progress_report | object | Details about the progress of a batch load task. |
record_version | integer (int64) | |
report_configuration | object | Report configuration for a batch load task. This contains details about where error reports are stored. |
resumable_until | string (date-time) | |
target_database_name | string | |
target_table_name | string | |
task_id | string | The ID of the batch load task. (pattern: <code>[A-Z0-9]+</code>) |
task_status | string | Status of the batch load task. (CREATED, IN_PROGRESS, FAILED, SUCCEEDED, PROGRESS_STOPPED, PENDING_RESUME) |
| Name | Datatype | Description |
|---|---|---|
batch_load_tasks | array | A list of batch load task details. |
next_token | string | A token to specify where to start paginating. Provide the next ListBatchLoadTasksRequest. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_batch_load_task | select | region | Returns information about the batch load task, including configurations, mappings, progress, and other details. Service quotas apply. See code sample for details. | |
list_batch_load_tasks | select | region | Provides a list of batch load tasks, along with the name, status, when the task is resumable until, and other details. See code sample for details. | |
create_batch_load_task | insert | region, DataSourceConfiguration, ReportConfiguration, TargetDatabaseName, TargetTableName | Creates a new Timestream batch load task. A batch load task processes data from a CSV source in an S3 location and writes to a Timestream table. A mapping from source to target is defined in a batch load task. Errors and events are written to a report at an S3 location. For the report, if the KMS key is not specified, the report will be encrypted with an S3 managed key when SSE_S3 is the option. Otherwise an error is thrown. For more information, see Amazon Web Services managed keys. Service quotas apply. For details, see code sample. |
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
- describe_batch_load_task
- list_batch_load_tasks
Returns information about the batch load task, including configurations, mappings, progress, and other details. Service quotas apply. See code sample for details.
SELECT
creation_time,
data_model_configuration,
data_source_configuration,
error_message,
last_updated_time,
progress_report,
record_version,
report_configuration,
resumable_until,
target_database_name,
target_table_name,
task_id,
task_status
FROM aws.timestream_write.batch_load_tasks
WHERE region = '{{ region }}' -- required
;
Provides a list of batch load tasks, along with the name, status, when the task is resumable until, and other details. See code sample for details.
SELECT
batch_load_tasks,
next_token
FROM aws.timestream_write.batch_load_tasks
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_batch_load_task
- Manifest
Creates a new Timestream batch load task. A batch load task processes data from a CSV source in an S3 location and writes to a Timestream table. A mapping from source to target is defined in a batch load task. Errors and events are written to a report at an S3 location. For the report, if the KMS key is not specified, the report will be encrypted with an S3 managed key when SSE_S3 is the option. Otherwise an error is thrown. For more information, see Amazon Web Services managed keys. Service quotas apply. For details, see code sample.
INSERT INTO aws.timestream_write.batch_load_tasks (
ClientToken,
DataModelConfiguration,
DataSourceConfiguration,
ReportConfiguration,
TargetDatabaseName,
TargetTableName,
RecordVersion,
region
)
SELECT
'{{ ClientToken }}',
'{{ DataModelConfiguration }}',
'{{ DataSourceConfiguration }}' /* required */,
'{{ ReportConfiguration }}' /* required */,
'{{ TargetDatabaseName }}' /* required */,
'{{ TargetTableName }}' /* required */,
{{ RecordVersion }},
'{{ region }}'
RETURNING
task_id
;
# Description fields are for documentation purposes
- name: batch_load_tasks
props:
- name: region
value: "{{ region }}"
description: Required parameter for the batch_load_tasks resource.
- name: ClientToken
value: "{{ ClientToken }}"
- name: DataModelConfiguration
value:
DataModel:
TimeColumn: "{{ TimeColumn }}"
TimeUnit: "{{ TimeUnit }}"
DimensionMappings:
- SourceColumn: "{{ SourceColumn }}"
DestinationColumn: "{{ DestinationColumn }}"
MultiMeasureMappings:
TargetMultiMeasureName: "{{ TargetMultiMeasureName }}"
MultiMeasureAttributeMappings:
- SourceColumn: "{{ SourceColumn }}"
TargetMultiMeasureAttributeName: "{{ TargetMultiMeasureAttributeName }}"
MeasureValueType: "{{ MeasureValueType }}"
MixedMeasureMappings:
- MeasureName: "{{ MeasureName }}"
SourceColumn: "{{ SourceColumn }}"
TargetMeasureName: "{{ TargetMeasureName }}"
MeasureValueType: "{{ MeasureValueType }}"
MultiMeasureAttributeMappings: "{{ MultiMeasureAttributeMappings }}"
MeasureNameColumn: "{{ MeasureNameColumn }}"
DataModelS3Configuration:
BucketName: "{{ BucketName }}"
ObjectKey: "{{ ObjectKey }}"
- name: DataSourceConfiguration
description: |
Defines configuration details about the data source for a batch load task.
value:
DataSourceS3Configuration:
BucketName: "{{ BucketName }}"
ObjectKeyPrefix: "{{ ObjectKeyPrefix }}"
CsvConfiguration:
ColumnSeparator: "{{ ColumnSeparator }}"
EscapeChar: "{{ EscapeChar }}"
QuoteChar: "{{ QuoteChar }}"
NullValue: "{{ NullValue }}"
TrimWhiteSpace: {{ TrimWhiteSpace }}
DataFormat: "{{ DataFormat }}"
- name: ReportConfiguration
description: |
Report configuration for a batch load task. This contains details about where error reports are stored.
value:
ReportS3Configuration:
BucketName: "{{ BucketName }}"
ObjectKeyPrefix: "{{ ObjectKeyPrefix }}"
EncryptionOption: "{{ EncryptionOption }}"
KmsKeyId: "{{ KmsKeyId }}"
- name: TargetDatabaseName
value: "{{ TargetDatabaseName }}"
description: |
Target Timestream database for a batch load task.
- name: TargetTableName
value: "{{ TargetTableName }}"
description: |
Target Timestream table for a batch load task.
- name: RecordVersion
value: {{ RecordVersion }}