About the H2 Database

June 18th, 2020

H2 is the default database that Mango uses. It's an embedded Java database so you don't have to do any extra configurations.

H2 has some nice built in features which you can read more about here: http://www.h2database.com/html/functions.html

Exporting to CSV

This will export the contents of a table to a csv file into the root Mango folder.

    call CSVWRITE ( 'h2export.csv', 'SELECT * FROM DATAPOINTS' )

H2 Web Manager

The H2 database comes with it's own web based manager tool. To enable this set db.web.start=true in the /classes/env.properties file and restart Mango

You can also start the H2 web console independently of Mango by running the h2-web-console.bat script on Window or h2-web-console.sh on Linux and Mac.

Your JDBC URL should be: jdbc:h2:./databases/mah2.199

Copyright © 2024 Radix IoT, LLC.