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

influxdb3 write and query support for string, file, or stdin input #25892

Open
sanderson opened this issue Jan 22, 2025 · 0 comments
Open

influxdb3 write and query support for string, file, or stdin input #25892

sanderson opened this issue Jan 22, 2025 · 0 comments
Labels

Comments

@sanderson
Copy link
Contributor

The influxdb3 write and influxdb3 query commands should both support input via string, file, or stdin.

Currently, influxdb3 write only supports writing line protocol from a file. I would propose supporting all of the following:

# string
$ influxdb3 write --database EXAMPLE_DB 'home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1736841600'

# file
$ influxdb3 write --database EXAMPLE_DB --file /path/to/data.lp

# stdin
$ cat ./data.lp | influxdb3 write --database EXAMPLE_DB -

Current, the influxdb3 query command only lets you pass the query via a string argument. I would propose supporting all of the following:

# string
$ influxdb3 query --database EXAMPLE_DB 'SELECT * FROM home'

# file
$ influxdb3 query --database EXAMPLE_DB --file /path/to/query.sql

# stdin
$ cat ./query.sql | influxdb3 query --database EXAMPLE_DB -

Use case:
Adding this functionality would bring these commands closer to parity with influxctl write and influxctl query.

Proposal:
Add support for string-, file-, and stdin-based input for influxdb3 write and influxdb3 query commands.

Related issues:
@hiltontj hiltontj added the v3 label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants