cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

CSV reading with Lua

maciejzab
1-Newbie

CSV reading with Lua

Hello,

I am part of the team working on a project for a Polish customer. The architecture of our solution enforces reading a csv file  that contains data collected from sensors. We would like to write a lua script that would read a csv file and then push separate values into different parameters in ThingWorx however we don't really know where to start with that as our lua skills are kind of poor. 

Is there anyone that could help us with this?

The CSV will contain data separated by pipes and each line will have its own unique id like below:

id|time|param1value|param2value
1404139713|30-06-2014 08:23|12.12|53.56



1 REPLY 1
adam11
5-Regular Member
(To:maciejzab)

Hi Maciej,

There is a CSV Parser extension available (see the Downloads page) that allows you to parse and write CSV files from within the ThingWorx platform. I recommend using it instead of parsing these files on the Edge. You'll be able to avoid any Lua scripting and achieve the same result.


Thanks,

Adam



Top Tags