Infinity Configuration if Column Names change

I use Infinity to make charts with data from CSV files. This works if the column names as in the CSV header don’t change. But in some of my CSV files (that are daily or monthly updated) I have column names that can change. Think of “Top 10 Customers” so it can change who these are. Example for CSV:

DATUM,Übrige,Hostx,Infomac,Swalb
01.07.24,796769,453431,331353,200857
01.08.24,801440,453175,334181,199029
01.09.24,801413,454126,335603,197302
01.10.24,802129,454928,336804,195769

The next month it may look like this:

DATUM,Übrige,Hostx,Infomac,Minx
01.07.24,796769,453431,331353,200957
01.08.24,801440,453175,334181,199929
01.09.24,801413,454126,335603,198302
01.10.24,802129,454928,336804,198769
01.11.24,802229,455928,337804,199769

So the names of the companies in the header may change so I cannot refer to them in the configuration when I setup the columns within Infinity. Is it possible to refer to the columns as #1 #2 or similar? Is it possible at all to work with such CSV files?

welcome to forum @Pixal

Are there always 5 columns or could there be more? and which visualization do you want to use for this?

the number of columns doesn’t change. It will be a time series in the end (with the Business Chart Plugin).

1 Like

So yes in business chart using javascript should be easy to parse the data. it is more of javascript question than a grafana question. just process the data as is in grafana and in javascript process it to build your time series

What do you mean by that - if the data is from a CSV file, do I not have to use either the Infinity or the CSV plugin? And for parsing, these want me to define the columns using their names as far as I understand.

It is an Infinity question, I guess.

yes you do use infinity plugin to read the data but the other stuff you are talking about should be done in Business Chart as show in attached image

Didn’t see the image yet when replying, so will look at it and try to figure out what’s going on. Did you put something below “UQL”? It’s hidden by the console window.
I’m quite new to all of this and Javascript too

1 Like

yes I am using parse-csv

https://grafana.github.io/grafana-infinity-datasource/docs/uql

thank you for your help! What did you use as UQL command, only parse-csv ? It is not visible in the screenshots.
Sorry for the question, I’m not familiar with UQL or the console.

yes that is all. you can find out more about uql here. and no you do not have to use uql, you can use raw csv

https://grafana.github.io/grafana-infinity-datasource/docs/uql

the console is just your browser console, hit F12 and you will see it, or right click on your browser and choose Inspect.