CsvReadActivity
Category: File Operations Namespace: CMS.Plugin.FlowManagement.Domain.FlowBusiness.Activitys Base Class: ActionActivity Module: FlowManagement.Domain
Overview
CsvReadActivity (CSV Data Read) is a node used to read CSV file data in the process. It inherits from ActionActivity and supports reading CSV data from a specified file or directory, writing the result as a list of dictionaries to the process context.
Configuration Description
| Property Name | Type | Required | Default | Description |
|---|---|---|---|---|
| CsvFilePathContext | string | No | - | File directory from process context, takes last updated file |
| CsvFilePath | string | No | - | Specified file path (Priority) |
| CsvSeperator | string | No | , | CSV data separator |
| CsvRowCount | int | No | 1 | Read row count (excluding header) |
| CsvRowReverse | bool | No | false | Whether to reverse data (start from last row) |
| CsvReadResultContext | string | No | CsvReadResult_Value | Process context key name for result |
Process Context
Output Parameters
| Parameter Name | Type | Description |
|---|---|---|
{CsvReadResultContext} | List<Dictionary<string, object>> | CSV read result, each row is a dictionary |
Usage Examples
{
"Type": "CsvReadActivity",
"Name": "Read Product Data",
"Alias": "ReadProductCsv",
"CsvFilePath": "C:\\Data\\products.csv",
"CsvSeperator": ",",
"CsvRowCount": 100,
"CsvReadResultContext": "ProductData_Value"
}
Notes
- 💡 First row is treated as header, subsequent rows as data.
- 💡 CsvFilePath takes precedence over CsvFilePathContext.
- 💡 When reading from a directory, the last updated CSV file is selected.
- ⚠️ Returns empty list if file does not exist.
Related Nodes
- CsvWriteActivity: CSV Write Node
- FileReadActivity: File Read Node
Update History
| Date | Version | Description |
|---|---|---|
| 2025-11-28 | 1.0 | Initial version |
Last updated: 2025-11-28