Closed fredmef closed 3 years ago
Hi @fredmef,
thanks for using our client.
Array with the following columns:
time | tag_1 .... | tag_x | field_1 ... | field_y
If you would like to have result as a tabular data, then use pivot() function in your query. Something like:
from(bucket:"test")
|> range(start: 1970-01-01T00:00:00.000000000Z)
|> pivot(
rowKey:["_time"],
columnKey: ["_field"],
valueColumn: "_value"
)
Regards
Hi @bednar,
the pivot()
function do the right job for me.
Thanks a lot for this information.
Regards
Proposal: Add the following new format for query result: Array with the following columns:
Current behavior: Currently output formats are only unprocessed string and FluxRecord. These formats are not easy to exploit directly and need some extra treatments to be used.
Desired behavior: A query result as an array with columns corresponding to the desired ones.
Alternatives considered: None.
Use case: It helps users (simplify and accelerate development) coming from others databases and from previous InfluxDB php clients.