Skip to content

SQL connector

This connector lets you connect data from a SQL server. To connect several tables, you have to create several instances of this connector (one per table).

To connect to an SQL table, you need to provide all the fields Host, Database, Port, Table, Login, Password.

The field named Datasource variable is an advanced field (not mandatory). See details below.

button Clear cache

When you connect a SQL table, Serenytics has a cache where it temporarily stores the list of columns and their types. This is an optimization to speed up the queries. But if you change the model of your SQL table (e.g. add a column or change a column's type), this change won't be visible immediately in Serenytics. To ensure your model's evolution is visible in Serenytics, you need to clear the cache using this button.

Datasource variables

You can use this field to specify a dict of values to be used in the settings fields (e.g. Host, Table...).

Here is an example of value: {"server_postfix":"PROD", "table_version": 2}

Then you can use these variables in the Database field, for example:

myserver_{{server_postfix}}

The double curly bracket syntax {{xxx}} will be replaced by its value from the datasource variables you defined.

When this datasource is used in a dashboard, these datasource variables are overwritten by variables defined in a dashboard.

If your dashboards are embedded in another app, you can provide these variables in the embedding payload (i.e. payload passed to the embed API). Using this mechanism, you can have a single dashboard that is embedded once and queries several databases (usually one by customer).