DescribeDatasetCommand

Describes an Amazon Forecast dataset created using the CreateDataset  operation.

In addition to listing the parameters specified in the CreateDataset request, this operation includes the following dataset properties:

  • CreationTime

  • LastModificationTime

  • Status

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ForecastClient, DescribeDatasetCommand } from "@aws-sdk/client-forecast"; // ES Modules import
// const { ForecastClient, DescribeDatasetCommand } = require("@aws-sdk/client-forecast"); // CommonJS import
const client = new ForecastClient(config);
const input = { // DescribeDatasetRequest
  DatasetArn: "STRING_VALUE", // required
};
const command = new DescribeDatasetCommand(input);
const response = await client.send(command);
// { // DescribeDatasetResponse
//   DatasetArn: "STRING_VALUE",
//   DatasetName: "STRING_VALUE",
//   Domain: "RETAIL" || "CUSTOM" || "INVENTORY_PLANNING" || "EC2_CAPACITY" || "WORK_FORCE" || "WEB_TRAFFIC" || "METRICS",
//   DatasetType: "TARGET_TIME_SERIES" || "RELATED_TIME_SERIES" || "ITEM_METADATA",
//   DataFrequency: "STRING_VALUE",
//   Schema: { // Schema
//     Attributes: [ // SchemaAttributes
//       { // SchemaAttribute
//         AttributeName: "STRING_VALUE",
//         AttributeType: "string" || "integer" || "float" || "timestamp" || "geolocation",
//       },
//     ],
//   },
//   EncryptionConfig: { // EncryptionConfig
//     RoleArn: "STRING_VALUE", // required
//     KMSKeyArn: "STRING_VALUE", // required
//   },
//   Status: "STRING_VALUE",
//   CreationTime: new Date("TIMESTAMP"),
//   LastModificationTime: new Date("TIMESTAMP"),
// };

DescribeDatasetCommand Input

See DescribeDatasetCommandInput for more details

Parameter
Type
Description
DatasetArn
Required
string | undefined

The Amazon Resource Name (ARN) of the dataset.

DescribeDatasetCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
CreationTime
Date | undefined

When the dataset was created.

DataFrequency
string | undefined

The frequency of data collection.

Valid intervals are Y (Year), M (Month), W (Week), D (Day), H (Hour), 30min (30 minutes), 15min (15 minutes), 10min (10 minutes), 5min (5 minutes), and 1min (1 minute). For example, "M" indicates every month and "30min" indicates every 30 minutes.

DatasetArn
string | undefined

The Amazon Resource Name (ARN) of the dataset.

DatasetName
string | undefined

The name of the dataset.

DatasetType
DatasetType | undefined

The dataset type.

Domain
Domain | undefined

The domain associated with the dataset.

EncryptionConfig
EncryptionConfig | undefined

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

LastModificationTime
Date | undefined

When you create a dataset, LastModificationTime is the same as CreationTime. While data is being imported to the dataset, LastModificationTime is the current time of the DescribeDataset call. After a CreateDatasetImportJob  operation has finished, LastModificationTime is when the import job completed or failed.

Schema
Schema | undefined

An array of SchemaAttribute objects that specify the dataset fields. Each SchemaAttribute specifies the name and data type of a field.

Status
string | undefined

The status of the dataset. States include:

  • ACTIVE

  • CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED

  • DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED

  • UPDATE_PENDING, UPDATE_IN_PROGRESS, UPDATE_FAILED

The UPDATE states apply while data is imported to the dataset from a call to the CreateDatasetImportJob  operation and reflect the status of the dataset import job. For example, when the import job status is CREATE_IN_PROGRESS, the status of the dataset is UPDATE_IN_PROGRESS.

The Status of the dataset must be ACTIVE before you can import training data.

Throws

Name
Fault
Details
InvalidInputException
client

We can't process the request because it includes an invalid value or a value that exceeds the valid range.

ResourceNotFoundException
client

We can't find a resource with that Amazon Resource Name (ARN). Check the ARN and try again.

ForecastServiceException
Base exception class for all service exceptions from Forecast service.