• 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

    Exporting in CSV

    Scheduled Pinned Locked Moved User help
    4 Posts 3 Posters 1.3k Views 3 Watching
    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.
    • P Offline
      psysak
      last edited by

      Hey, I searched and I think I know the answer (no) but I thought I would ask. I've been asked to generate a custom CSV once a day based on point data. Basically just export some point name, value and timestamp. Is that possible right now? I just want it stored on the local drive because then I'll FTP it out.

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

        Far be it from me to say it can't be done!

        One straightforward way for complete control is to just write out to a file from a scripting environment:

        var fileOutputStream = null;
        try {
          fileOutputStream = new java.io.FileOutputStream( new java.io.File("/path/to/output/file.csv"), false );
          var writer = new java.io.PrintWriter(fileOutputStream);
          for(var k = 0; k < valuesList.length; k+=1) {
            writer.println("Your constructed CSV line here.");
          }
        } finally {
          if(fileOutputStream != null)
            fileOutputStream.close();
        }
        

        It may also be possible to use an excel report and trigger a process event handler to run some other program that converts Excel to CSV (such a thing must exist...). Stack exchange suggests open office may have you covered: https://unix.stackexchange.com/questions/23726/convert-a-xlsx-ms-excel-file-to-csv-on-command-line-with-semicolon-separated

        1 Reply Last reply Reply Quote 0
        • Jared WiltshireJ Offline
          Jared Wiltshire
          last edited by

          Another option would be to use cron and curl to grab the a CSV file from the REST API (use an auth token). This wont allow you to do a custom format but I think we already pretty much have the format you are asking for. Try downloading the CSV file using the download button on a watch list and let me know if its suitable.

          Developer at Radix IoT

          1 Reply Last reply Reply Quote 0
          • P Offline
            psysak
            last edited by

            You guys are awesome :)
            Thank you

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