• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Help building a csv import class

    Scripting general Discussion
    2
    2
    1.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sprokkie
      last edited by

      Hi guy's

      i am reading the mang help file about csv class. It is really not clear for me.
      I have this file see attachment link text
      With powershell i selct the file of today and copy the file in to another directory with a new name that is always the same so mango can findthe file.
      I would like to use the last line that is written for my data points.

      The system status is written at the end of the log period
      That needs to be read as well for the datapoint,

      can some one help me with the csv import class file ?

      thanks in advanced

      phildunlapP 1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap @sprokkie
        last edited by phildunlap

        @sprokkie
        Are you referring to the Data File Data Source?

        If you only want the last row, you'll either want to know how many rows there are and generate the list of import points on then, or create a new 'parsedPoints' list at each row. The abstract "importRow" method will give you one line of Strings split by commas. Loop over the values in the array, and for each one

        this.parsedPoints.add(new AlphanumericImportPoint( "Point number: " + n, data[n] , now.getTime() ));

        You can find a good example in the module's folder inside your Mango. Mango/web/modules/dataFile/web/CompilingGrounds/CSV

        1 Reply Last reply Reply Quote 0
        • First post
          Last post