Reading data from file

Hi

I am reading data from a CSV file and shipping it into influx.
I have made a flow that is working, it's a bit ruff and I could use some help finishen up.

My flow looks like this.

My problem is that this setup is needed for every type of unit I have making a CSV file.
My CSV file looks like this.

200923224515	654216315	Serial-number	Firmware-Number	1	46	-61	89450100170913022654	382	14	0

200923214603	167.101	247.755	0	0	0	0	0.05	0.001	8.051000	19.280001	0	0	0	0	0	0	0	0	3.86	0	0	0	0
200923214703	166.648	247.56	0	0	0	0	0.036	0.001	8.061000	19.280001	0	0	0	0	0	0	0	0	3.86	0	0	0	0

The serial number is the units name, but depending on the firmware-number, the data I need to read is different, so after the long explanation, my question is as follows.

Is there a way to make a setup, so it is read the data depending on what the firmware number is?
And happy new year to all :slight_smile:

Read the data in and after the file.in node, put a switch node.

Use the msg.firmware field to route the message.

If you don't understand this, put a debug node just after the file.in node and show the entire message.

Hope that helps.

Thanks a lot, that was it and a simple one as well :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.