1 Reply Latest reply on Jun 30, 2014 11:35 AM by adam RSS
    maciejzab 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



      • CSV reading with Lua
        adam Creator

        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