-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
feat(cmd/influx): influx cli can write CSV files #17398
Conversation
9bdf63a
to
a2b358b
Compare
dc3a578
to
487cf8c
Compare
with this pr, we can also close #17356 |
62161fa
to
ede26fc
Compare
@sranka If using the linepart annotation in annotated CSV without the datatype annotations, should the |
@sranka Also, how do you handle string and boolean field values with the |
@sanderson linepart annotation is now independent on datatype annotation, at least conceptually. linepart places column data in the line, datatype is just field data type. Regarding the data type annotation:
It might be simpler to introduce extra field, measurement or tag (and ignore) values in the datatype annotation so that the user could then supply a single annotation line (#datatype) to specify fields (with types) and non-field columns (measurement, time, tag and ignored). As I write this comment I tend to change the existing implementation this way and remove the linepart annotation. WDYT? There is a wide area of enhancements that could be done regarding CSV, once this gets merged:
|
…alues in datatype annotation
…nto 17003/writeFromCsv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLI looks good on my end. Would like to see @sebito91 or someone from @influxdata/storage-team take a gander at those bits
ctx = signals.WithStandardSignals(ctx) | ||
if err := s.Write(ctx, orgID, bucketID, r); err != nil && err != context.Canceled { | ||
return fmt.Errorf("failed to write data: %v", err) | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func fluxWriteDryrunF(cmd *cobra.Command, args []string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excellent, CLI is looking good from my end. Thanks for running with feedback here 👍
Closes #17003 #17356
This PR
a new "write dryrun" (i.e. 'write' command with 'dryrun' sub-command) can be used to validate and tune annotations in CSV files; parameters are the as in "write", but line protocol is written to stdout
keeps the existing functionality (writing line protocol data) without changes
CHANGELOG.md updated with a link to the PR (not the Issue)
Well-formatted commit messages
Rebased/mergeable
Tests pass
Documentation updated or issue created (provide link to issue/pr)
Signed CLA (if not already signed)