Table schema and items / Delete Items
This task allows to permanently delete items from a table.
Task name:
DANGER
Items deleted with the Data Factory Task table-delete-items
are permanently deleted. They cannot be restored, and must be reimported.
Examples
json
{
"name": "table-delete-items",
"taskReferenceName": "a",
"description": "The business description of the task",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"tableKey": "products",
"mode": "USER_SELECTION",
"maximum": 100,
"fileName": "items.xml"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
json
{
"name": "table-delete-items",
"taskReferenceName": "a",
"description": "The business description of the task",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"tableKey": "products",
"partitions": ["ACTIVE","ARCHIVED"],
"mode": "ALL",
"maximum": 100,
"fileName": "items.xml"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
json
{
"name": "table-delete-items",
"taskReferenceName": "a",
"description": "The business description of the task",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"tableKey": "products",
"partitions": ["ACTIVE","ARCHIVED"],
"mode": "REQUEST",
"request": "file://assets/request.xml",
"maximum": 100,
"fileName": "items.xml"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Definition
Property | Type | Required | Description |
---|---|---|---|
The name (or type) of the task | |||
The unique name of the task in your job. It is used to reference this task in the workflow. | |||
The functional description of this task in your job. | |||
The type of the task. It must be SUB_WORKFLOW . | |||
true : the job continues if there is an error on this task. false : the job fails. | |||
Input parameters of the task. See below |
Inputs Parameters
Property | Type | Required | Description |
---|---|---|---|
The target table from which items must be deleted | |||
The table owner account key | |||
The item deletion modeALL : All items from any mentionned partition on the target tableUSER_SELECTION : User selected items on the grid. Only compatible with a user selection on the grid on app.product-live.comREQUEST : Filtered items based on a request xml file. The request file has the same format as for the table-export-items task | |||
List of partitions key from which items must be deleted At least one partition is required. Otherwise no item is deleted | |||
The xml request file to filter items to be deleted The request file has the same format as for the table-export-items task | |||
The xml generated output file name The file name must contain the extension: .xml This file contains the deleted items | |||
The maximum number of items to delete. If more items are selected/filtered/exist, the deletion stops at this number |
ALL
mode
The ALL
mode allows the deletion of all items (within the defined limit) from any mentionned partition on the target table .
USER_SELECTION
mode
The USER_SELECTION
mode allows the deleted of all (within the defined limit) user selected items on the grid at the job launch time.
WARNING
This mode can only be used if the job is launched from the app.product-live.com interface. A selection from the grid must be made by the user.
Deleting an item selection on multi-level tables
TIP
- Selected items are deleted
- All child items of selected items are deleted
- Parent items of selected items are not deleted
- Item selection is made from the grid on app.product-live.com, therefore selected items can only be of a single level (as a screen can only display items of a single level)
REQUEST
mode
TIP
The request file has the same format as for the table-export-items task.
The REQUEST
mode allows to filtered items to delete based on a request xml file.
xml
<Items-Request>
<Filters>
<Filter-Field-Single-Select key="season" operator="EQUALS">
<Option>spring</Option>
<Option>summer</Option>
</Filter-Field-Single-Select>
<Filter-Field-Single-Line-Text key="title" operator="STARTS_WITH">
<Value>Dress</Value>
</Filter-Field-Single-Line-Text>
<Filter-Field-Number key="price" operator="NOT_EMPTY" />
</Filters>
<Properties>
<Field key="price" />
<Field key="stock" />
</Properties>
</Items-Request>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Deleting filtered items on multi-level tables
TIP
- Filtered items are deleted
- All child items of filtered items are deleted
- Parent items of filtered items are not deleted
Outputs
Property | Type | Description |
---|---|---|
If at least 1 item is deleted: YES , Otherwise NO | ||
The xml file containing deleted items | ||
List the generated xml file |