# CSV
Ingests **CSV files** from a folder — for machines or systems that export
measurements as files rather than speaking a live protocol. New files matching an
item's pattern are parsed and their rows published as data items, with timestamps
taken from the file content.
| | |
|---|---|
| Connection string | `csv://FOLDER_PATH` |
| Reads | ✔ |
| Writes | — |
| Subscriptions | ✔ (file ingestion / replay) |
## Address format
A **regular expression** matched against the file names in the folder, e.g.
`report_.*\.csv`.
## Item options (`extraOptions`)
| Key | Type | Default | Meaning |
|---|---|---|---|
| `seperator` | string | `,` | Column separator. |
| `containsHeaders` | boolean | `false` | First row is a header row; otherwise columns are indexed `0..n`. |
| `template` | string | — | Mapping template for columns → values. |
| `eachKeyToItem` | boolean | — | Emit each key/column as its own data item. |
| `timeSettings` | object | — | Where and how to read the timestamp: `{ "format": "unix" or a SimpleDateFormat pattern, "timezone": "Europe/Berlin", "indices": [0] }`. |
## Example configuration
```json
{
"devices": [
{
"objectId": "csv1",
"name": "Lab exports",
"connectionString": "csv:///data/exports",
"interval": 10000,
"enabled": true,
"options": {},
"extraOptions": { "host": "broker:1883", "clientId": "openconnect" }
}
],
"items": [
{
"objectId": "lab",
"DeviceID": { "objectId": "csv1" },
"address": "measurement_.*\\.csv",
"label": "Lab measurement",
"type": "Number",
"unit": "",
"source": { "tag": "lab" },
"enabled": true,
"onChange": false,
"extraOptions": {
"seperator": ";",
"containsHeaders": true,
"timeSettings": {
"format": "yyyy-MM-dd HH:mm:ss",
"timezone": "Europe/Berlin",
"indices": [0]
}
}
}
]
}
```