Adding a Data Source

Add a Table

To add a table to a data query, use the SAS Folders tree to locate the table (Metadata Table) and then drag and drop the table onto the workspace.
Tip
You can also click Search and search for the table by name and location.

Add a Subquery

After you have created a data query and saved it, it can be used as an input data source to another data query. To add a subquery, use the SAS Folders tree to locate the data query (data query), and then drag and drop the data query onto the workspace.
The subquery is represented in the workspace by the columns that are selected for output in the subquery..

Best Practices for Adding Data Sources

When you plan to join data sources (tables or subqueries), the order in which you add the data sources to the workspace matters. The first data source that is added to the workspace is automatically assigned as the left table for any joins that you add to the data query.
If you are creating a data query that uses a fact table and dimension tables, it is simplest to drag and drop the fact table onto the workspace first. You can perform left, right, or full joins with the dimension tables faster because you need to specify the join type only. However, if you drag and drop a dimension table first, you can easily use the Switch button on the Joins tab to switch the left and right tables in the join.
If you are not using a fact table or dimension tables, then the sequence for adding tables to the workspace might not be very important. Just remember that the first table dropped onto the workspace is assigned as the left table, and you can switch the left table and right table on the Joins tab. The data builder takes advantage of vendor-specific features in SQL processing whenever possible. If the source tables are from a third-party vendor database, the SAS/ACCESS Interface engine can optimize the performance of the data query by passing the SQL statements through to the database.