Skip to main content

datasets

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

Overview

Namedatasets
TypeResource
Idaws.comprehend.datasets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)Creation time of the dataset.
dataset_arnstringThe 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_namestringThe name of the dataset. (pattern: <code>^[a-zA-Z0-9](-[a-zA-Z0-9])$</code>)
dataset_s3_uristringThe S3 URI where the dataset is stored. (pattern: <code>s3:​//[a-z0-9][.-a-z0-9]{1,61}[a-z0-9](/.*)?</code>)
dataset_typestringThe dataset type (training data or test data). (TRAIN, TEST)
descriptionstringDescription of the dataset. (pattern: <code>^([a-zA-Z0-9_])[\a-zA-Z0-9_@#%+=:?./!\s-]$</code>)
end_timestring (date-time)Time when the data from the dataset becomes available in the data lake.
messagestringA description of the status of the dataset.
number_of_documentsinteger (int64)The number of documents in the dataset.
statusstringThe 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)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_datasetselectregionReturns information about the dataset that you specify. For more information about datasets, see Flywheel overview in the Amazon Comprehend Developer Guide.
list_datasetsselectregionList the datasets that you have configured in this Region. For more information about datasets, see Flywheel overview in the Amazon Comprehend Developer Guide.
create_datasetinsertregion, FlywheelArn, DatasetName, InputDataConfigCreates 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;