|
Dataset - Delete row |
Declaration
<AMDATASET ACTIVITY="delete_row" DATASET="text" INDEX="number" />
Description
Deletes one or more specified rows from a dataset.
Practical Usage
Used to delete one or more specified rows from a dataset.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Dataset name | Text | Yes | (Empty) | DATASET="Customers" | Specifies the dataset to delete rows from. |
Delete at | Text (options) | Yes | End |
|
Specifies where to delete the rows at. The options are:
|
Rows (for example,. 1 or 1,3,5) | Number | Yes | (Empty) | INDEX="5,23,33,37" | The row index numbers to delete. To delete more than one row at a time, separate each row index number by a comma (for example, 1,4,55,200). This parameter is required if Delete at is set to Row index. |
Example
NOTE:
- The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
Description
This task uses the Create, Insert Row, and Delete Row Dataset activities to first create a dataset with three columns, append two rows with data at the end of it, and then finally deletes the first row in the dataset by index number.
EXAMPLE:
<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="FirstEntryvalue1" /><COLUMNSETTER COLUMNNAME="heading2" VALUE="FirstEntryvalue2" /><COLUMNSETTER COLUMNNAME="heading3" VALUE="FirstEntryvalue3" /></AMDATASET>
<AMDATASET ACTIVITY="insert_row" DATASET="myDataset"><COLUMNSETTER COLUMNNAME="heading1" VALUE="SecondEntryvalue1" /><COLUMNSETTER COLUMNNAME="heading2" VALUE="SecondEntryvalue2" /><COLUMNSETTER COLUMNNAME="heading3" VALUE="SecondEntryvalue3" /></AMDATASET>
<AMDATASET ACTIVITY="delete_row" DATASET="myDataset" INDEX="1" />
<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="FirstEntryvalue1" /><COLUMNSETTER COLUMNNAME="heading2" VALUE="FirstEntryvalue2" /><COLUMNSETTER COLUMNNAME="heading3" VALUE="FirstEntryvalue3" /></AMDATASET>
<AMDATASET ACTIVITY="insert_row" DATASET="myDataset"><COLUMNSETTER COLUMNNAME="heading1" VALUE="SecondEntryvalue1" /><COLUMNSETTER COLUMNNAME="heading2" VALUE="SecondEntryvalue2" /><COLUMNSETTER COLUMNNAME="heading3" VALUE="SecondEntryvalue3" /></AMDATASET>
<AMDATASET ACTIVITY="delete_row" DATASET="myDataset" INDEX="1" />