While designing dashboard using data source, we often have a need to change the connection string. For example, we may use local server while designing a dashboard report and we may want to change the connection string while publishing or making the dashboard live to our global users.
You can reconnect the data source with any of the supported connection type using "" option provided in the Dashboard Designer. The tables/columns used in table relationship, expressions, initial filters and widget bound data will be retained while reconnecting only when the below conditions are meet.
Conditions for retaining schema
For tables and views
1) Existing table name should be matched with new table name and table relationship (joining conditions) must be same for existing and new tables.
2) Existing field name of each tables should be matched with new fields.
For code view
1) If it is in code view mode, we can change the connection string for same connection type only. Cross data source connection is not applicable.
Ex: SQL- SQL, Oracle-Oracle is alone applicable.
Example for re-connecting
1) We have created a data source using MySQL connection type.
2) Then we have created some expressions which are required to design dashboard report using the connected data source.
3) Configure the visualization widgets using the fields available from the connected data source.
4) Now the report is created. For some reason, we need to change the connection from MySQL type to PostgreSQL. So select "Edit Connection" option.
5) Enter the PostgreSQL details and click "Reconnect" button. If the above mentioned conditions to retain schemas are satisfied, tables and fields are retained as such.
6) If some of field names are different, those mismatched field will be unselected in that table and it will be removed from all other places where those field is used in our application like expressions, widgets, linking and user filters.
Removed from expressions:
Removed from widgets:
7) While reconnecting data source, if the new connection string has entirely different fields compared to older ones, it will show the below alert window.
If you click "Yes", it will do the below operations:
If you click "No", previous tables and fields are maintained.
Limitations for reconnecting data source
2) You cannot reconnect the ODBC ANSI SQL to any other connection types and vice versa.
3) You cannot reconnect the data source with other connection types if it is in code view. Cross data source connection is not applicable in this scenario.
Ex: SQL – Oracle, SQL – My SQL
This page will automatically be redirected to the sign-in page in 10 seconds.