tencent cloud

All product documents
Tencent Cloud Observability Platform
Item.delete
Last updated: 2025-03-11 19:41:14
Item.delete
Last updated: 2025-03-11 19:41:14
Item.delete marks the data row represented by this Item as deleted, and it will not be used during the execution of the current script.
datele(): void

Return

Type
Description
void
No content returned.

Usage Examples

Mark a row of data in the parameter file as deleted:
import dataset from 'pts/dataset';

export function setup() {
// Traverse the parameter file named 'test.csv'.
dataset.forEach('test.csv', (item) => {
// If the data value of the key 'key1' in the data row item is '1', mark it as deleted, and it will not be used during the execution of this script.
if (item.data.key1 === '1') {
item.delete();
}
});
}

export default function() {
// The data rows with 'key1' column having a value of '1' will not be accessed during the script execution.
const record = dataset.random('test.csv');
console.log(JSON.stringify(record));
}

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon