Program to open a Excel file using pandas and create a output file to be source in InfluxDB.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- Setup the input file (
file_path
) - Configure the necessary columns to import (
col_names
,col_types
andcol_ids
) - Fix your data using pandas dataframes functions.
- Organize your line protocol as:
<measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>]
- Run with
python main.py
inside the venv. - Access your InfluxDB and import the txt file setting up the timing precision (ex. nanoseconds)
- https://pandas.pydata.org/docs/reference/api/pandas.read_excel.html
- https://docs.influxdata.com/influxdb/v2/reference/syntax/line-protocol/
Almir A. Braggio