datasets
Creates, updates, deletes, gets or lists a datasets resource.
Overview
| Name | datasets |
| Type | Resource |
| Id | aws.comprehend.datasets |
Fields
The following fields are returned by SELECT queries:
- describe_dataset
- list_datasets
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | Creation time of the dataset. |
dataset_arn | string | The ARN of the dataset. (pattern: <code>arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]:[0-9]{12}:flywheel/[a-zA-Z0-9](-[a-zA-Z0-9])/dataset/[a-zA-Z0-9](-[a-zA-Z0-9])*</code>) |
dataset_name | string | The name of the dataset. (pattern: <code>^[a-zA-Z0-9](-[a-zA-Z0-9])$</code>) |
dataset_s3_uri | string | The S3 URI where the dataset is stored. (pattern: <code>s3://[a-z0-9][.-a-z0-9]{1,61}[a-z0-9](/.*)?</code>) |
dataset_type | string | The dataset type (training data or test data). (TRAIN, TEST) |
description | string | Description of the dataset. (pattern: <code>^([a-zA-Z0-9_])[\a-zA-Z0-9_@#%+=:?./!\s-]$</code>) |
end_time | string (date-time) | Time when the data from the dataset becomes available in the data lake. |
message | string | A description of the status of the dataset. |
number_of_documents | integer (int64) | The number of documents in the dataset. |
status | string | The dataset status. While the system creates the dataset, the status is CREATING. When the dataset is ready to use, the status changes to COMPLETED. (CREATING, COMPLETED, FAILED) |
| Name | Datatype | Description |
|---|---|---|
dataset_properties_list | array | The dataset properties list. |
next_token | string | Identifies the next page of results to return. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_dataset | select | region | Returns information about the dataset that you specify. For more information about datasets, see Flywheel overview in the Amazon Comprehend Developer Guide. | |
list_datasets | select | region | List the datasets that you have configured in this Region. For more information about datasets, see Flywheel overview in the Amazon Comprehend Developer Guide. | |
create_dataset | insert | region, FlywheelArn, DatasetName, InputDataConfig | Creates a dataset to upload training or test data for a model associated with a flywheel. For more information about datasets, see Flywheel overview in the Amazon Comprehend Developer Guide. |
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_dataset
- list_datasets
Returns information about the dataset that you specify. For more information about datasets, see Flywheel overview in the Amazon Comprehend Developer Guide.
SELECT
creation_time,
dataset_arn,
dataset_name,
dataset_s3_uri,
dataset_type,
description,
end_time,
message,
number_of_documents,
status
FROM aws.comprehend.datasets
WHERE region = '{{ region }}' -- required
;
List the datasets that you have configured in this Region. For more information about datasets, see Flywheel overview in the Amazon Comprehend Developer Guide.
SELECT
dataset_properties_list,
next_token
FROM aws.comprehend.datasets
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_dataset
- Manifest
Creates a dataset to upload training or test data for a model associated with a flywheel. For more information about datasets, see Flywheel overview in the Amazon Comprehend Developer Guide.
INSERT INTO aws.comprehend.datasets (
FlywheelArn,
DatasetName,
DatasetType,
Description,
InputDataConfig,
ClientRequestToken,
Tags,
region
)
SELECT
'{{ FlywheelArn }}' /* required */,
'{{ DatasetName }}' /* required */,
'{{ DatasetType }}',
'{{ Description }}',
'{{ InputDataConfig }}' /* required */,
'{{ ClientRequestToken }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
dataset_arn
;
# Description fields are for documentation purposes
- name: datasets
props:
- name: region
value: "{{ region }}"
description: Required parameter for the datasets resource.
- name: FlywheelArn
value: "{{ FlywheelArn }}"
description: |
The Amazon Resource Number (ARN) of the flywheel of the flywheel to receive the data.
- name: DatasetName
value: "{{ DatasetName }}"
description: |
Name of the dataset.
- name: DatasetType
value: "{{ DatasetType }}"
description: |
The dataset type. You can specify that the data in a dataset is for training the model or for testing the model.
valid_values: ['TRAIN', 'TEST']
- name: Description
value: "{{ Description }}"
description: |
Description of the dataset.
- name: InputDataConfig
description: |
Information about the input data configuration. The type of input data varies based on the format of the input and whether the data is for a classifier model or an entity recognition model.
value:
AugmentedManifests:
- AttributeNames: "{{ AttributeNames }}"
S3Uri: "{{ S3Uri }}"
AnnotationDataS3Uri: "{{ AnnotationDataS3Uri }}"
SourceDocumentsS3Uri: "{{ SourceDocumentsS3Uri }}"
DocumentType: "{{ DocumentType }}"
DataFormat: "{{ DataFormat }}"
DocumentClassifierInputDataConfig:
S3Uri: "{{ S3Uri }}"
LabelDelimiter: "{{ LabelDelimiter }}"
EntityRecognizerInputDataConfig:
Annotations:
S3Uri: "{{ S3Uri }}"
Documents:
S3Uri: "{{ S3Uri }}"
InputFormat: "{{ InputFormat }}"
EntityList:
S3Uri: "{{ S3Uri }}"
- name: ClientRequestToken
value: "{{ ClientRequestToken }}"
description: |
A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
- name: Tags
description: |
Tags for the dataset.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"