Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import csv: add the option to fail the import if datatype is a long and a float is in the data #18744

Closed
russorat opened this issue Jun 25, 2020 · 1 comment · Fixed by #18779
Assignees

Comments

@russorat
Copy link
Contributor

t,f
my_tag,1
my_tag,1.9

right now, both of these work:

➜  influxdb git:(master) ./bin/darwin/influx write dryrun -f ~/Downloads/float.csv --header "t|tag,f|long" --header "#constant measurement,m" --skipHeader
m,t=my_tag f=1i
m,t=my_tag f=1i
➜  influxdb git:(master) ./bin/darwin/influx write dryrun -f ~/Downloads/float.csv --header "t|tag,f|double" --header "#constant measurement,m" --skipHeader
m,t=my_tag f=1
m,t=my_tag f=1.9

as a user, I would like a way to fail the import if i have a column marked as a long and a float value is truncated. possibbly via a --strict flag? Also, in all cases, I would expect a warning printed similar to the case of multiple date fields indicating a loss of precision.

@sranka
Copy link
Contributor

sranka commented Jun 29, 2020

#18779 allows to specify a strict mode in a format of long/unsignedLong data types, it fails when using --header "t|tag,f|long:strict"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants