tencent cloud

Tencent Cloud Observability Platform

Item Overview

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-03-11 19:41:14
Item represents a row of data in the parameter file and a marker indicating whether it has been deleted in the current script execution. It is used in the dataset.forEach method.

Field

Field
Type
Description
data
Record<string, string>
The column names and corresponding data values for that particular parameter row.

Methodology

Methodology
Return Type
Description
delete()
void
Mark that row of data as deleted, indicating that it will not be used during the current script execution.

Usage Examples

Traverse the parameter file, and perform modifications and deletions:
import dataset from 'pts/dataset';

export function setup() {
// Traverse the parameter file named 'test.csv'.
dataset.forEach('test.csv', (item) => {
// Change the data value of the key 'key5' in the data row item to '555'.
item.data.key5 = '555';
// 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();
}
});
}


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック