https://github.com/stuartcarnie/line2csv
Transforms InfluxDB line protocol to CSV
https://github.com/stuartcarnie/line2csv
converter csv go golang influxdb
Last synced: 7 months ago
JSON representation
Transforms InfluxDB line protocol to CSV
- Host: GitHub
- URL: https://github.com/stuartcarnie/line2csv
- Owner: stuartcarnie
- Created: 2017-12-13T02:14:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-22T15:08:59.000Z (about 6 years ago)
- Last Synced: 2025-02-21T17:48:53.868Z (about 1 year ago)
- Topics: converter, csv, go, golang, influxdb
- Language: Go
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
line2csv
========
Transform InfluxDB line protocol to CSV.
Usage
-----
Specifying both input and output files:
```bash
$ ./line2csv input.txt -o output.csv
```
Format
------
For each line, every field will generate a separate line in the CSV.
**Input:**
```text
cpu,host=foo,region=us-west-1 user=0.50,system=0.25 1000
cpu,host=foo,region=us-west-1 user=0.10,system=0.15 1001
```
**Output:**
```csv
timestamp,key,field_name,field_value
1000,"cpu,host=foo,region=us-west-1",user,0.50
1000,"cpu,host=foo,region=us-west-1",system,0.25
1001,"cpu,host=foo,region=us-west-1",user,0.10
1001,"cpu,host=foo,region=us-west-1",system,0.15
```