Creating a staging database table from a query

You can create tables and add their columns manually, or you can add columns by querying a data source. If you create a table from a query, the target table's schema has the same structure as the result set of the query.

  1. Select Dashboards > Data Integrations > Relational Modeling.
  2. From the Target Connection list, select Staging.
  3. Click New Table and specify this information:
    Name
    Specify a name for the table.
    Description
    Optionally, specify a description of the table.
  4. Click Next.
  5. Click Add columns from query.
  6. Specify this information.
    Query Name
    Specify a name for the query or accept the default. The load query is saved and can be reused repeatedly to load data.
    Application
    Select the application that you are modeling and in which you want to store the load query.
    Source Connection
    Select the data connection that provides access to the source table.
    Query Description
    Optionally, describe the query.
    Query
    Specify the query. For example:
    select
    ID as ID
    ,ParentID as ParentID
    ,ElementType as ElementType
    ,Weight as Weight
    ,Name as Name
    ,QPU as QPU
    ,ReorderLevel as Reorder_Level
    ,Discontinued as Discontinued
    from 
    Products
    
    Note: Custom settings are not supported.
  7. Click Add.
    The wizard shows you the columns that result from the query and enables you to change data types and to select a primary key.
  8. Click Finish.
    The table is created with the specified columns but no data is automatically loaded. The Load Queries tab is displayed. You can use the same query to load data into the table.