Composing Data Sources from Databases

After you create database connections, you can begin creating data sources for those connections for use in projects.

To create data sources from database connections:
  1. Launch the Select a Table dialog using one of these actions:
    • On the Data Sources page, click Add Data Source, and then From Database.
    • In the project Data Sources pane, click the Add Data Source link, then Create New Data Source, and then From Database.
    • In the project Data Elements pane, right-click the pane, select Add Data Source, then Create New Data Source, and then From Database.

    Note:

    You must create the database connection before you can create a data source for it. For more information, see Creating Database Connections.
  2. From the connection drop-down list, select the database connection that you want to use.
  3. Perform one of these actions:
    • On the Tables tab, browse to search for and select the database that you want to use. Click OK and then choose a table. The table you choose is treated as a live connection but the system doesn’t load the table. When you use columns from this table in a project, the system issues a database query to fetch the needed data.
    • Click Logical SQL to display the Logical SQL Statement box. Type a SQL statement to select a specific set of columns. If you enter and run a SQL statement to create a virtual table, the results are loaded into the cache. Make sure that your SQL statement produces the most compact result set possible, otherwise the virtual table may be too large to cache. For example if you want to fetch City, State, Month, Year, and Revenue, then your SQL statement should select City, State, Month, Year, Sum(Revenue).

    Note:

    If you need take a step back to pick a different database or look at the logical SQL again, click the “back” button at the bottom of the dialog.
  4. Click OK.
  5. Preview the data or exclude columns from the data source, and then click Add to Project.
    A cached copy of the data source is created, and you can refresh the data and metadata from that data source, as needed.