Create a DB Data Source

After the database connection is created, the data sources can be created for the connection as follows:

  1. In Canvas Studio, click Connections on the left pane.
    The existing connections are listed in the Connections and Data Sources on the right pane.

  2. Right-click the connection and select Create Data Source.


    The Create New Data Source page appears.



  3. In the Create Data Source page, enter a unique data source name in the Data Source Name field.

  4. Optional: If you want to create a datasource passing SQL queries, perform the following steps:

    1. Toggle on the Is SQL? field.


    2. Enter the query on the Data Query field. 

      To apply constructed queries for the data source, refer Applying constructed queries for SQL Data Sources


      It is mandatory to add ‘#’ symbol at the front of the parameter.

    3. Click Parameter Configuration () icon to configure the parameter settings.

    4. Select access category and define data types for the parameters on Category and Data Type fields. You can also set a default parameter value on the Default Value field if required.


    5. Click outside the window to save the parameter values.

    6. Proceed to step 9.

  5. Click the Object Name 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.



  6. Click the Column IDs field and select the columns to be fetched.

    Ensure that the column names in a particular table don't get separated by blank spaces, since the column names with blank spaces will be deemed as void columns and henceforth, no column names should be separated with blank spaces, but however, the underscore symbol can be used to separate lengthy column names for a particular table. 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:


  7. Optional: Enter the condition for filtering the data in the Where Clause field. For example, the where condition, Price > (select avg(Price) from Products) can be given in the Where Clause field.

    If suppose, you want to fetch data based on certain values, you will have to specify the exact values in the Where Clause field. For example, consider the following SQL query:

    select * from Products
    where Product_ID = 'P001'

    Here, Product_ID = 'P001' can be given in the Where Clause field.

  8. Optional: Enter the column names by which you want to sort the data in ascending or descending order in the Order By field.

  9. Click Save.
    The following confirmation message appears:

  10. Click Ok.