Delen via


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

  1. Start Report Manager.

  2. In Report Manager, locate a folder where you have permissions to create a new data source.

  3. Click New Data Source. The New Data Source page opens.

  4. 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 ; ? : @ & = + , $ / * < > | " /.

  5. Optionally type a description to to give users information about the connection. This description will appear on the Contents page in Report Manager.

  6. 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.

  7. 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
    
  8. 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 (SSRS).

  9. Click OK.

To create a model

  1. In Report Manager, locate the shared data source item.

  2. Click the item to open it. The General Properties page opens.

  3. Click Generate Model. The Generate New Model page opens.

  4. Type a name for the item.

  5. (Optional) Type a description for the item.

  6. Click OK.

  7. Click Apply.

    Reporting Services generates a model for the data source. The model automatically includes primary keys.

To save the model on your computer

  1. In Report Manager, locate the shared data source that you created the model for in the previous procedure.

  2. Click Edit. The File Download dialog box opens.

  3. Click Save. The Save As dialog box opens.

  4. 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

  1. In Business Intelligence Development Studio, create a new report model project.

  2. From the Project menu, click Add Existing Item.

  3. Navigate to the location where you saved the model in the previous procedure.

  4. Click the model file.

  5. 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.

  6. 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).