Dataset - Create
Declaration
<AMDATASET RESULTDATASET="text" COLUMNS="text" CUSTOMDELIMITER="text" DELIMITER="text (options)" DESCRIPTION="text" />
Description
Creates an empty dataset.
Practical usage
Used to create an empty dataset.
IMPORTANT: Some column names may contain special characters (for example, !-()@#). In this scenario, you must manually add a bracket notation to the column name for the Task Builder to interpret it correctly. For example, %DatasetName.[File_Size_(MB)]%.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Dataset name | Text | Yes | (Empty) | RESULTDATA="Customers" | Specifies the dataset to create. |
Initial column names as delimiter separated list (optional) | Text | No | (Empty) | COLUMNS="First name" | The initial columns to insert into the empty dataset. To add columns, enter each column name, and then separate them using the desired Delimiter option below. |
Delimiter | Text (Options) | Yes | Comma |
|
Specifies the delimiter to use to separate columns in this dataset. The options are:
|
Custom delimiter text | Text | No | (Empty) | CUSTOMDELIMITER="|" | The custom characters to separate each column with. This parameter becomes active if Delimiter is set to Custom. |
Description (optional) | Text | No | (Empty) | DESCRIPTION="Total customer base" | The optional description of the dataset. |
Example
NOTE:
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Description
This task uses the Create and Insert Row activities to create a dataset with three columns, and then adds a row with values for those columns at the end of the dataset.
Copy
<AMDATASET RESULTDATASET="myDataset" COLUMNS="heading1;heading2;heading3" DELIMITER="semi_colon" DESCRIPTION="This is user input description showing in variables panel of Task Builder" />
<AMDATASET ACTIVITY="insert_row" DATASET="myDataset">
<COLUMNSETTER COLUMNNAME="heading1" VALUE="value1" />
<COLUMNSETTER COLUMNNAME="heading2" VALUE="value2" />
<COLUMNSETTER COLUMNNAME="heading3" VALUE="value3" />
</AMDATASET>