2a. Create a DB Connection and Data Source
You can easily create a database connection in Canvas Studio with viable and feasible configurations. To serve the purpose of establishing a connection with your schema, a database connection is created to facilitate the process of fetching the data from the schema. To create a database connection and DB data source, refer the following sections:
A brief overview on creating a database connection in Canvas Studio is provided as follows:
- In Canvas Studio, click Create > Connection.
- In the Create New Connection screen, select your database management system, e.g. MySQL.
- Provide a unique name in the Connection Name field.
- Provide the appropriate Host Name, Port number, DB/Schema Name, User Name and Password.
- To test the connection, click Test.
- Once the connection gets tested successfully, click Save to save the connection.
Create a DB Connection
The step-by-step procedure to create a database connection in Canvas Studio is listed as follows:
- Log on to Canvas Studio with your credentials.
- On the home page of Canvas Studio, click Create > Connection.
The Create New Connection page appears. In the Create New Connection page, in the Connection Type, click Data Base.
Enter a unique name for the connection in the Connection Name field, e.g. NEW CONNECTION.
Click the database used for your application, e.g. MySQL.
Enter the server name that hosts the database in the Host Name field.
Enter the server port number in the Port field
Enter the database or the schema name in DB/Schema Name field, e.g. smartbank.
- Enter the user name to connect to the database in the User Name field.
Enter the password to connect to the database in the Password field.
To create connections on the SIR environment, it is required to use Natted IP information from the SIR's database server instead of the IP address from SQL developers. Kindly contact the IT team for the Natted IP information for any specific SIR environment.
Click Test.
If the provided credentials are correct, a successful message appears else a failure message appears. If a failure message appears, enter the correct credentials and click Test again.
- Click Save.
A confirmation message, indicating a successful save, appears. - Click Ok.
Create a DB Data Source
You can easily create a DB data source in Canvas Studio with viable and feasible configurations. Data sources serve as the vital cog in facilitating the process of fetching the data from the various listed tables, present in the database.
A brief overview on creating a DB data source in Canvas Studio is provided as follows:
- In Canvas Studio, right-click the existing connection and select the Create Data Source option.
- In the Create Data Source screen, provide a unique name in the Data Source Name field.
- Click the Object Name lookup field and select the table, from which you want to fetch the data.
- Click the Column IDs field and select the columns of your choice from the selected table. To select all the columns of the table at the same time, click Select All option.
- Click Save to save the newly created data source.
The step-by-step procedure to create a DB data source in Canvas Studio is listed as follows:
- In Canvas Studio, click Connections on the left pane.
The existing connections are listed in the Connections and Data Sources on the right pane. - Right-click the connection and select Create Data Source.
The Create New Data Source page appears. In the Create Data Source page, enter a unique data source name in the Data Source Name field, e.g. ACCOUNT SUMMARY DS.
The Is SQL? toggle is an optional field. This field is used to facilitate the purpose of using SQL statements.
Click the Object Name lookup field and select the table, view, or stored procedure name from which you need to fetch the data.
Stored procedures are enabled for reports only and are yet to be enabled in App Designer. The input parameters for stored procedure can be passed during the configuration of the base report in Canvas Studio and the values can be altered in Sigma screen as well. Refer Creating a Data Source using Stored Procedure for more information on creating a datasource using stored procedure.
Click the Column IDs field and select the columns to be fetched.
To quickly select all the columns for the report, click the Select All () icon. To remove all the selected columns, click the Remove All () icon. To select specific columns, select the checkbox adjacent to the column names as shown in the following screen shot:
The Where Clause and Order By fields are optional.
- Click Save.
A confirmation message, indicating a successful save, appears. - Click Ok.