How to put all fields on the same vector in InfluxDB 2.7?


I am currently trying to migrate from Influxdb 1.8 OSS to InfluxDB 2.7 OSS. Not easy between the new data query language (Flux) and the new data structure. I just don’t understand this structuring of InfluxDB 2.7 data storage.

When I send data in InfluxDB 1.8, I have all the fields in a series (same timestamp, same tagset) on the same vector:

But when I send data in InfluxDB 2.7, I get one vector per field with the timestamp and tagset repeated on each vector:

How can I get back to a vector containing all the fields?

Thanks for your help :slight_smile:

For reference, here’s the request I used to add this data :

curl -X POST -k '' \
             --header 'Authorization: Token abcdefghijklmnopqrstuvwxyz1234567890' \
			 --header 'Content-Type: text/plain' \
			 --data-raw 'DAC.BOU.DAAMIC042,siteGeographique='test',elevage='test',distributeur='DAC.BOU. DAAMIC042',animalRfid='999000000000000',animalIpg='00000000000',animalNumero='000000',lot='Lot_DAF/00',dateDebut=1679353220085000000,dateFin=1679353220706000000, alimentId='1999',alimentCode='SAP-2022-001-AUT',numeroSidex='3827',libelleSidex='SCI_mRFI_2023_2',dateTransfert=1701184844314000000 poidsAlimentAutorise=0,poidsAlimentConsomme=0. 0010,poidsAlimentDistribue=0,poidsAlimentRestant=0.5640,poidsAnimal=0,duree=0,probleme=0 1701243866000000000'

@theirman With Flux, you can get InfluxQL-like results by pivoting the field columns into each row. At the end of your current query, include the following:

    |> pivot(rowKey: ["_time"], columnKey: ["_field"], valueColumn: "_value")