All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::NLPAUTOML::Dataset

Last Updated:Jul 04, 2023

ALIYUN::NLPAUTOML::Dataset is used to create a dataset.

Syntax

{
  "Type": "ALIYUN::NLPAUTOML::Dataset",
  "Properties": {
    "DatasetName": String,
    "ProjectId": Integer,
    "DatasetRecord": List
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

DatasetName

String

Yes

No

The name of the dataset.

The name can be up to 32 characters in length. The name cannot start with a digit or punctuation mark.  

ProjectId

Integer

Yes

No

The project ID.

This property must be specified when you create the dataset in a project.  

DatasetRecord

List

No

No

The fields that are used to label the document content.

You must specify a JSON string that consists of the fields used for data labeling. Example:

{"content":"This brand provides great dates.","records":{"Emotion":"Positive"}}

Return values

Fn::GetAtt

DatasetId: the dataset ID.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DatasetName:
    AllowedPattern: ^[a-zA-Z][-_a-zA-Z0-9]{1,32}$
    Description: The name of dataset. Cannot start with numbers and symbols, and the
      length cannot be greater than 32 characters.
    Type: String
  ProjectId:
    Description: The ID of project. To create a dataset under a certain project, fill
      in the target project ID.
    Type: Number
Resources:
  Dataset:
    Properties:
      DatasetName:
        Ref: DatasetName
      ProjectId:
        Ref: ProjectId
    Type: ALIYUN::NLPAUTOML::Dataset
Outputs:
  DatasetId:
    Description: The dataset ID.
    Value:
      Fn::GetAtt:
      - Dataset
      - DatasetId

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DatasetName": {
      "Type": "String",
      "Description": "The name of dataset. Cannot start with numbers and symbols, and the length cannot be greater than 32 characters.",
      "AllowedPattern": "^[a-zA-Z][-_a-zA-Z0-9]{1,32}$"
    },
    "ProjectId": {
      "Type": "Number",
      "Description": "The ID of project. To create a dataset under a certain project, fill in the target project ID."
    }
  },
  "Resources": {
    "Dataset": {
      "Type": "ALIYUN::NLPAUTOML::Dataset",
      "Properties": {
        "DatasetName": {
          "Ref": "DatasetName"
        },
        "ProjectId": {
          "Ref": "ProjectId"
        }
      }
    }
  },
  "Outputs": {
    "DatasetId": {
      "Description": "The dataset ID.",
      "Value": {
        "Fn::GetAtt": [
          "Dataset",
          "DatasetId"
        ]
      }
    }
  }
}