• 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

    How do I selectively delete a large number of points?

    User help
    3
    5
    1.8k
    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.
    • V
      Vlasta
      last edited by

      I need to selectively remove a large portion of data points (~50k points, so doing it manually is not an option).

      I exported all my points as a csv file, and separated ones I want to keep, and ones I want to purge.

      I was hoping I could remove points via csv file import/export, but this does not seem to be possible. What is the best way to do a selective point deletion? Is it possible (and advisable) to delete directly from the database?

      Optionally, since I don't yet have any data associated with these points, could I delete the whole lot, and use csv import to only bring back points I need? If so, how would I delete it?

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

        Hi Vlasta, you are correct in thinking you could delete everything and then recreate what is desired via the importer, but this would lose point value histories.

        I would do this by massaging your CSV of the points you wish to delete into a list of XIDs and then doing it on the SQL console. So, you have an 'xid' column in your CSV, and if you can get it into the format: ('xid1', 'xid2', .... ) you can do something like this at the SQL console....

        DELETE FROM dataPoints WHERE xid IN ('DP_012345', 'DP_123456', .... 'DP_567890');
        
        1 Reply Last reply Reply Quote 0
        • Jared WiltshireJ
          Jared Wiltshire
          last edited by

          Note that deleting the data points using the SQL console will not delete the point values straight away. However these will be deleted when the data purge occurs, usually nightly.

          Developer at Radix IoT

          1 Reply Last reply Reply Quote 0
          • V
            Vlasta
            last edited by

            Thanks, both answers helped a lot.
            Is there a way to make System Settings -> 'Purge now...' remove more than 100000 records per run?

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

              Unfortunately there is no way.

              You can also do it from the SQL console, try this
              DELETE FROM pointValues WHERE dataPointId NOT IN (SELECT ID FROM dataPoints) LIMIT xxx

              Developer at Radix IoT

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