Table Alias Mappings
The Table Alias Mappings functionality in Data Access Studio (DAS) assigns aliases to database tables, enhancing the representation of tables in reports. This feature enables the presentation of data in a more user-friendly manner and promotes portability.
Automatic Mapping and Manual Intervention
The Table Alias Mappings functionality in Data Access Studio (DAS) assigns a simple, unambiguous table alias name to each database table referenced for an external data connection. The report is then built against these aliases. These table aliases are registered (usually automatically) with the connection and map to the actual table names. Then, in the future, if a table is moved to a new schema or database (or even if the name changes), then just the connection mapping is updated instead of changing the report.
Note
The "administrator" of the connection is going to be the owner if it is a client connection (such as a report developer) or the DAS Administrator if it is a server connection.
When users open new tables for an external data connection, DAS will automatically attempt to create a table alias with a unique name. If it is unable to determine a unique name, the administrator of the connection can manually create an entry in the Table Alias Mappings tab to supply a unique alias name for users to use when referencing the desired table.
When DAS shows available tables for an external data connection, it uses an automatic discovery process to query the database for all known tables. If the data provider does not provide a catalog of tables to open, it is possible to leverage this mapping system to manually populate the catalog. In such cases, an administrator of the connection can create a table alias mapping for the desired table so that it becomes available to end users when they open the connection.
Mass Updating Table Qualifications
To mass update a set of table qualifications in table alias mappings, please select all the tables that you want updated. Then either right-click and select Update Qualification or click the same button on the toolbar.
When the dialog pops up you are presented with two text boxes with checkboxes by each one. Please select the checkboxes for the value that you want updated.
To eliminate the schema qualification, the database qualification, or both, simply check the box to update the selected part of the qualification and leave the textbox empty. Leaving the textbox empty while the update box is checked will remove that part of the qualification from the table name when the OK button is pressed. There's no need to manually include quotes for either value; they will be automatically applied when you click the OK button.
Example Usage
To illustrate the benefits of this functionality, consider the following scenario: a table named TestTable within the Test schema, residing in the AdventureWorks2019 database.
In reports, the table will be referenced solely as TestTable, without explicitly mentioning the original table name or schema. However, if the user needs to switch to the production version of the table, they can conveniently access the connection edit dialog and modify the mapping to point to the desired prod table without affecting reports built off of the TestTable table.
Remarks
To incorporate table aliases into your existing reports/table lookups please refer to table alias conversion documentation for more info.
If table mappings are not automatically quoted or if the qualified schema needs to be changed, please refer to our advanced options documentation on how to set these options up.