Export
Project description
Export CSV To Influx: Process CSV data, and export the data to influx db
Install
Use the pip to install the library. Then the binary export_csv_to_influx is ready.
` pip install ExportCsvToInflux `
Features
Allow to use binary export_csv_to_influx to run exporter
Allow to check dozens of csv files in a folder
Auto convert csv data to int/float/string in Influx
Allow to limit string length in Influx
Allow to judge the csv has new data or not
Allow to use the latest file modify time as time column
Auto Create database if not exist
Allow to drop database before inserting data
Allow to drop measurements before inserting data
Allow to match or filter the data by using string or regex.
Allow to count, and generate count measurement
Command Arguments
You could use export_csv_to_influx -h to see the help guide.
-c, –csv, Input CSV file path, or the folder path. Mandatory
-d, –delimiter, CSV delimiter. Default: ‘,’.
-lt, –lineterminator, CSV lineterminator. Default: ‘ ‘.
-s, –server, InfluxDB Server address. Default: localhost:8086.
-u, –user, InfluxDB User name.
-p, –password, InfluxDB Password.
-db, –dbname, InfluxDB Database name. Mandatory
-m, –measurement, Measurement name. Mandatory
-t, –time_column, Timestamp column name. Default: timestamp. If no timestamp column, the timestamp is set to the last file modify time for whole csv rows.
-tf, –time_format, Timestamp format. Default: ‘%Y-%m-%d %H:%M:%S’ e.g.: 1970-01-01 00:00:00.
-tz, –time_zone, Timezone of supplied data. Default: UTC.
-fc, –field_columns, List of csv columns to use as fields, separated by comma. Mandatory
-tc, –tag_columns, List of csv columns to use as tags, separated by comma. Mandatory
-b, –batch_size, Batch size when inserting data to influx. Default: 500.
-lslc, –limit_string_length_columns, Limit string length column. Default: None.
-ls, –limit_length, Limit length. Default: 20.
-dd, –drop_database, Drop database before inserting data.
-dm, –drop_measurement, Drop measurement before inserting data.
-mc, –match_columns, Match the data you want to get for certain columns, separated by comma.
-mbs, –match_by_string, Match by string, separated by comma.
-mbr, –match_by_regex, Match by regex, separated by comma.
-fic, –filter_columns, Filter the data you want to filter for certain columns, separated by comma.
-fibs, –filter_by_string, Filter by string, separated by comma.
-fibr, –filter_by_regex, Filter by regex, separated by comma.
-ecm, –enable_count_measurement, Enable count measurement.
-fi, –force_insert_even_csv_no_update, Force insert data to influx, even csv no update.
For more info, please refer to the https://github.com/Bugazelle/export-csv-to-inlfux
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.