Bugazelle / export-csv-to-influx

The python library to write the CSV data into Influx. Support me via Bitcoin: bc1qqgkmph9cvygzxfpupv4jr4n0nfx3qumwg39j5w
BSD 3-Clause "New" or "Revised" License
35 stars 10 forks source link

fail with error: Unexpected time with format & Warning: Failed to force "xxx" to float, skip... #51

Open Lxeon opened 1 year ago

Lxeon commented 1 year ago

hello sir, i get Error when running cammand.

cammand: export_csv_to_influx --csv /mnt/ssd/docker/influxdb/data/data/apcupsd.csv --dbname Ubuntu --measurement apcupsd -u admin -p admin --force_float_columns battery_charge_percent,battery_voltage,input_frequency,input_voltage,internal_temp,load_percent,nominal_battery_voltage,nominal_input_voltage,output_voltage --force_int_columns nominal_power,status_flags,time_left_ns,time_on_battery_ns --force_string_columns battery_date,firmware -fc battery_charge_percent,battery_date,battery_voltage,firmware,input_frequency,input_voltage,internal_temp,load_percent,nominal_battery_voltage,nominal_input_voltage,nominal_power,output_voltage,status_flags,time_left_ns,time_on_battery_ns -tc host,model,serial,status,ups_name -t time

i had to force all field because if not , it will get the same name columns but different type..

fieldKey: 图片

tagKey: 图片

csv: 图片

error msg: 图片 图片

did i miss something?

7yl4r commented 1 year ago

Can you verify that all the values in the column(s) are valid (float|int)?

Lxeon commented 1 year ago

Can you verify that all the values in the column(s) are valid (float|int)?

图片

i create new database and run the command, but error after 3400 line? this csv i never change after export.

this is my export command: influx -database WindowsServer2022 -username 'admin' -password 'admin' -execute 'select * from apcupsd' -format csv >> apcupsd.csv