Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  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.
    Image Removed
    Image Added

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

    Image Added

  4. Click the Object Name field and select the object name from which you want need to fetch the data in the Table Names field. You can enter multiple table names separating each table name with a comma (see second code snippet in Step 7).

    Tip

    Alternatively, you can specify view name instead of the table name in the Table Names field. For example, if suppose you have created a database view as follows:

    Code Block
    languagesql
    create view Products_Above_Average_Price as
    select Product_Name, Unit, Price
    from Products
    where Price > (select avg(Price) from Products);

    In the SQL code snippet, Products_Above_Average_Price is the view name, which you can enter in the Tables Names field.

    Enter either * (asterisk) or column names separated by comma in the Column IDs field.



    Image Added

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

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

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

    Info

    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:

    Code Block
    languagesql
    select * from Products
    where Product_ID = 'P001'

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

    Consider another example as follows:

    Code Block
    languagesql
    select Product_Name, Unit, Price
    from Products, Categories
    where Products.Category_ID = Categories.Category_ID
    and Categories.Category_ID = 'C001'

    Here, Products.Category_ID = Categories.Category_ID and Categories.Category_ID = 'C001' is the where condition, which can be specified in the Where Clause field. The tables Products, Categories can be specified in the Table Names field.


  8. Click Save.
    The following confirmation message appears: