This article covers:
To make a connection to a MariaDB database, navigate to the Connections page, select New Connection, then select MariaDB from the New Connection modal:
You will be prompted to provide the following connection details to establish a connection to your MariaDB database:
Please refer to the examples in our developer documentation to find out how to create a connection to MariaDB via our API.
Notes:
Once you have connected your MariaDB you can add datasets as explained here.
{{metadata.< parameter name >|< default value >}}. Find out more about parameterized SQL Datasets.Also make sure to check out this article on Preparing your data for analytics.
To find out how to add datasets using our API, please refer to the examples in our developer documentation.
When generating an Authorization token to grant a user acces to your embedded dashboards it is possible to override the data source properties in the authorization request to dynamically use different properties. Find out more about connection overrides.
The fields available for overriding a MariaDB connection are as follows:
Our developer documentation has more info about connection overrides and examples of MariaDB connection overrides.
Example code demonstrating how to override a MariaDB connection:
import Luzmo from '@luzmo/nodejs-sdk';
const client = new Luzmo({
api_key: '<your Luzmo API key>',
api_token: '<your Luzmo API token>',
host: 'https://api.luzmo.com:443'
});
const response = await client.create('authorization',
{
type: "embed",
username: "< A unique and immutable identifier for your user >",
name: "< user name >",
email: "< user email >",
suborganization: "< a suborganization name >",
access: {
collections: [
{
id: "<collection_id>",
inheritRights: "use"
}
]
},
account_overrides: {
<your connection_id>: {
host: "<The new database host URL to connect to>",
user: "<username>",
password: "<password>"
}
}
}
);
| Data Type in MariaDB | Data Type in Luzmo |
|---|---|
| integer | numeric |
| int | numeric |
| smallint | numeric |
| tinyint | numeric |
| mediumint | numeric |
| bigint | numeric |
| decimal | numeric |
| numeric | numeric |
| float | numeric |
| double | numeric |
| bit | hierarchy |
| date | datetime |
| datetime | datetime |
| timestamp | datetime |
| time | datetime |
| year | datetime |
| char | hierarchy |
| varchar | hierarchy |
| binary | hierarchy |
| varbinary | hierarchy |
| text | hierarchy |
| tinytext | hierarchy |
| mediumtext | hierarchy |
| longtext | hierarchy |
| enum | hierarchy |
| set | hierarchy |
| json | hierarchy |