You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should make these args accept a consistent form.
Proposed solution
I think we should use space-separated lists. This seems to be a more conventional use of clap (see how it is implemented in the create table command here) and CLI commands in general. For example,
which leads to the creation of a table with a single tag "color,thickness" instead of two tags "color" and "thickness", and then writes to the database were not working for them because their line protocol assumed the latter.
Additional context
There may be an argument towards one solution or the other based on user expectation of tag/field naming conventions.
It is worth noting that both comma and space are allowed in tag names so long as they are escaped.
The text was updated successfully, but these errors were encountered:
What would the arguments look like for test plugin and create trigger? Currently it's a comma separated list of key/value pairs, which are separated by =
What would the arguments look like for test plugin and create trigger? Currently it's a comma separated list of key/value pairs, which are separated by =
Another similar example is the --fields argument in create table, which takes field names and their types, separated by :.
In that case it expects the key/value pair together, but still uses space-separation between key/value pairs, e.g.,
Problem statement
We don't have a standard convention for CLI args that accept lists of things.
In the
influxdb3 create table
command, we parse tags as space-separated list, e.g.,In the
influxdb3 create last_cache
command, we parse key columns as comma-separated list, e.g.,We should make these args accept a consistent form.
Proposed solution
I think we should use space-separated lists. This seems to be a more conventional use of
clap
(see how it is implemented in thecreate table
command here) and CLI commands in general. For example,Therefore, we would need to update the following commands:
SeparatedList
type is used, which extends to Enterprise.Alternatives considered
Use comma-separated lists. As per #25811, we had one internal user try to create a table with
which leads to the creation of a table with a single tag
"color,thickness"
instead of two tags"color"
and"thickness"
, and then writes to the database were not working for them because their line protocol assumed the latter.Additional context
There may be an argument towards one solution or the other based on user expectation of tag/field naming conventions.
It is worth noting that both comma and space are allowed in tag names so long as they are escaped.
The text was updated successfully, but these errors were encountered: