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.
Connecting to MySQL database with Python
-
I'm looking to make a naming change to approximately 600 datapoints. I wish to trim the names down that were imported and the easiest way that I know how is to use a Python script. Where would I find the mysql database connection configuration for Mango Enterprise.
-
You can find the connection details for your Mango instance in the Mango/overrides/properties/env.properties or Mango/classes/env.properties files. By default Mango uses the H2 database in embedded mode which would only allow another connection if Mango was stopped. I'm not sure if there is a nice library to connect Python to H2. It's assuredly easier with MySQL.
Usually I do the python work on a JSON export, because JSON is very easy to work with.
You can also use the /sqlConsole.shtm page if you are an SQL wizard.
Script environments in Mango have a JsonEmport script utility that can import json and make this kind of modification.
Have you checked out the bulk data point edit page in the new UI?