Global Datasources : Overview
Global datasources pull in and push data to any source including databases, external APIs, or services. Once a global datasource is connected to a workspace, the connection can be shared with any app of that workspace.
Global datasources are available only on ToolJet version 2.3.0 and above.
Connecting global datasources
From the ToolJet dashboard, go to the global datasources page from the left sidebar.
Click on the Add new datasource button, a modal will pop-up with all the available global datasources.
Select the datasource, enter the Credentials and Save the datasource.
Now, go back to the dashboard, create a new app, and the datasource will be available on the query panel under Global Datasources. Added datasources will be available on any of the existing or the new applications.
You can now create queries of the connected global datasource. From the queries, you'll be able to switch to different connections of the same datasource if there are more than one connections created.
Changing scope of datasources of an app created on older versions of ToolJet
On ToolJet versions below 2.3.0, the datasource connection was made from within the individual apps. To make it backward compatible, we added an option to change the scope of the datasources and make it global datasource.
If you open an app created on previos versions of ToolJet, you'll find the datasource manager on the left sidebar of the App Builder.
Click on the kebab menu next to the connected datasource, select the change scope option.
Once you change the scope of the datasource and make it global, you'll see that the datasource manager is removed from the left sidebar and now you'll find the datasource on the query panel under Global Datasources. You can now configure the datasource fromt the Global Datasource page on the dashboard.
By default, 4 datasources will be available on every app on ToolJet:
Only Admins and Super Admins of the workspace can change the Permissions for Global Datasource.
From Workspace Settings -> Groups Settings, Admins and Super Admins can set the permission for a user group to:
Create and Delete datasources onto that workspace. If Create permission is enabled then the users can add new global datasources and edit the datasources as well but cannot delete it, and if only Delete permission is set then the users of the group will only be able to delete the connected datasources on the workspace.
If any of the permission(Create or Delete) is not enabled for a user group then the users of the group will get an error toast when they try to Add or Delete the global datasource.
View or Edit allowed global datasources from the Datasources tab. If only View permission is set then the users of the group will only be able to connect to the allowed datasource, and if only Edit permission is set then the users of the group will be able to update the credentials of the allowed datasources.
If any of the permission(View or Edit) is not enabled for a user group then the users of the group will get an error toast when they try to Add or Delete the global datasource.