AWS::Forecast::Dataset - AWS CloudFormation

AWS::Forecast::Dataset

Creates an Amazon Forecast dataset. The information about the dataset that you provide helps Forecast understand how to consume the data for model training. This includes the following:

  • DataFrequency - How frequently your historical time-series data is collected.

  • Domain and DatasetType - Each dataset has an associated dataset domain and a type within the domain. Amazon Forecast provides a list of predefined domains and types within each domain. For each unique dataset domain and type within the domain, Amazon Forecast requires your data to include a minimum set of predefined fields.

  • Schema - A schema specifies the fields in the dataset, including the field name and data type.

After creating a dataset, you import your training data into it and add the dataset to a dataset group. You use the dataset group to create a predictor. For more information, see Importing datasets.

To get a list of all your datasets, use the ListDatasets operation.

For example Forecast datasets, see the Amazon Forecast Sample GitHub repository.

Note

The Status of a dataset must be ACTIVE before you can import training data. Use the DescribeDataset operation to get the status.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Forecast::Dataset", "Properties" : { "DataFrequency" : String, "DatasetName" : String, "DatasetType" : String, "Domain" : String, "EncryptionConfig" : Json, "Schema" : Json, "Tags" : [ Json, ... ] } }

YAML

Type: AWS::Forecast::Dataset Properties: DataFrequency: String DatasetName: String DatasetType: String Domain: String EncryptionConfig: Json Schema: Json Tags: - Json

Properties

DataFrequency

The frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.

Valid intervals are an integer followed by Y (Year), M (Month), W (Week), D (Day), H (Hour), and min (Minute). For example, "1D" indicates every day and "15min" indicates every 15 minutes. You cannot specify a value that would overlap with the next larger frequency. That means, for example, you cannot specify a frequency of 60 minutes, because that is equivalent to 1 hour. The valid values for each frequency are the following:

  • Minute - 1-59

  • Hour - 1-23

  • Day - 1-6

  • Week - 1-4

  • Month - 1-11

  • Year - 1

Thus, if you want every other week forecasts, specify "2W". Or, if you want quarterly forecasts, you specify "3M".

Required: No

Type: String

Minimum: 1

Maximum: 5

Pattern: ^1Y|Y|([1-9]|1[0-1])M|M|[1-4]W|W|[1-6]D|D|([1-9]|1[0-9]|2[0-3])H|H|([1-9]|[1-5][0-9])min$

Update requires: No interruption

DatasetName

The name of the dataset.

Required: Yes

Type: String

Minimum: 1

Maximum: 63

Pattern: ^[a-zA-Z][a-zA-Z0-9_]*

Update requires: Replacement

DatasetType

The dataset type.

Required: Yes

Type: String

Allowed values: ALL_DATASET_TYPES | ITEM_METADATA | RELATED_TIME_SERIES | TARGET_TIME_SERIES

Update requires: No interruption

Domain

The domain associated with the dataset.

Required: Yes

Type: String

Allowed values: CUSTOM | EC2_CAPACITY | INVENTORY_PLANNING | METRICS | RETAIL | WEB_TRAFFIC | WORK_FORCE

Update requires: No interruption

EncryptionConfig

A Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.

Required: No

Type: Json

Update requires: No interruption

Schema

The schema for the dataset. The schema attributes and their order must match the fields in your data. The dataset Domain and DatasetType that you choose determine the minimum required fields in your training data. For information about the required fields for a specific dataset domain and type, see Dataset Domains and Dataset Types.

Required: Yes

Type: Json

Update requires: No interruption

Tags

An array of key-value pairs to apply to this resource.

For more information, see Tag.

Required: No

Type: List of Json

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the resource name.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

The Amazon Resource Name (ARN) of the dataset.