Connecting to InfluxDB

0
Hello everyone,  does anyone know how to connect Mendx to a time series database like InfluxDB? The idea is to read the data from the database and show it in a data grid or in a line chart. This kind of databases come with an API Rest service that can be used to execute the queries. My approach is to obtain the data by consuming this API Rest service, not with a database connector. After some processing of the HTTP response, I am receiving  a JSON structure as follows:  {    "Value0":{       "time":"2020-03-30T09:00:04.5Z",       "MVCV":99,       "MVWF":99 }    "Value1":{       "time":"2020-03-30T09:00:04.5Z",       "MVCV":99,       "MVWF":99 },    "Value2":{       "time":"2020-03-30T09:00:04.5Z",       "MVCV":99,       "MVWF":99 },    "Value3":{       "time":"2020-03-30T09:00:04.5Z",       "MVCV":99,       "MVWF":99 }} I am using an import mapping that maps the JSON to several objects, but both the data grid and the line chart need a list of a certain object.  So my questions are: Is this the best approach? Is there any way I can map this JSON to a list that can be used by the data grid/line chart? Has anyone connected Mendix to InfluxDB (or any other time series database) in any other way? I believe the database connector does not support any time series database right now.    Thank you!
asked
1 answers
1

No there is no JDBC connector to connect directly to the database. But Influx supports REST API's so indeed that approach is the right one. Mendix can handle JSON lists. See the documentation here on how to consume REST services: https://docs.mendix.com/howto/integration/consume-a-rest-service

Regards,

Ronald

 

 

answered