How to: Create Primary Keys for a Teradata-Based Report Model (Reporting Services)
On the report server, you can create a Teradata-based model from a shared data source that specifies a connection string to a Teradata database. When you generate the model, it includes a data source view that automatically specifies primary keys for tables and views. To view or modify the model, load it into a Report Model project in Business Intelligence Development Studio.
The procedures in this topic include steps to create a Teradata-based model on a report server configured in native mode.
To create a shared data source
In Report Manager, locate a folder where you have permissions to create a new data source.
Click New Data Source. The New Data Source page opens.
Type a name for the item. A name must contain at least one character. It can also include spaces and certain symbols, but not the characters ; ? : @ & = + , $ / * < > | " /.
Optionally type a description to to give users information about the connection. This description will appear on the Contents page in Report Manager.
In the Connection Type list, specify the data source type TERADATA.
Note
The data source type TERADATA appears only if the Teradata data provider is installed on the report server. If you do not see TERADATA as a choice, work with your system administrator to ensure that the appropriate Teradata components are installed.
For Connection String, specify the connection string that the report server uses to connect to the data source. It is recommended that you do not specify credentials in the connection string.
The following example illustrates a connection string for connecting to a Teradata relational database on a server specified by an IP address, where N represents a digit:
data source=NNN.NNN.NNN.NNN
For Connect using, specify how credentials are obtained when the report runs:
If you want to prompt the user for a logon name and password, click Credentials supplied by the user running the report.
If you intend to use the data source as a shared data source for multiple users, or with reports that support subscriptions or other scheduled operations (such as automated report history generation), click Credentials stored securely in the report server.
For more information about how to configure credentials, see Specifying Credential and Connection Information for Report Data Sources.
Click OK.
To create a model
In Report Manager, locate the shared data source item.
Click the item to open it. The General Properties page opens.
Click Generate Model. The Generate New Model page opens.
Type a name for the item.
(Optional) Type a description for the item.
Click OK.
Click Apply.
Reporting Services generates a model for the data source. The model automatically includes primary keys.
To save the model on your computer
In Report Manager, locate the shared data source that you created the model for in the previous procedure.
Click Edit. The File Download dialog box opens.
Click Save. The Save As dialog box opens.
Navigate to the location on your computer where you want to save the model.
The model is saved with the file name extension .smdl.
To view primary keys
In Business Intelligence Development Studio, create a new report model project.
From the Project menu, click Add Existing Item.
Navigate to the location where you saved the model in the previous procedure.
Click the model file.
Click Add. The model is added to the project. In Solution Explorer, the data source view and the model are added to the project, and the model opens in Design view.
In Solution Expolorer in the Data Source Views folder, right-click the data source for the model that you imported, and then click View Designer. The data source view opens in Design view.
Each table or view in the data source view appears on the design surface. In each table, columns that are specified as primary keys display a key symbol in front of the column name.
For more information about primary keys, see Defining Logical Primary Keys in a Data Source View (Analysis Services).
See Also