Send feedback on this topic.
Teradata.Client.Provider
Configuration File Entity Section
.NET Data Provider for Teradata > Developer's Guide > Working with the Data Provider Features > Configuration Files > Configuration File Entity Section
.NET CORE   This feature is not supported by the .NET Core implementation of the Data Provider.

The <entity> Section Name

The mapping between the Tables and Views/ViewColumns is defined in the application configuration file "entity" Section name. The <configSections> must contain the definition of the entries that the Entity Provider will read to obtain the information on the mapping. The entries for the mapping definition are defined in Configuration Files.

The <entity> Section name within the <teradata.client> Section Group defines the mapping between the Views and ViewColumns and their corresponding tables. The following is an example of a mapping as it appears in an application configuration file:

Section Group
Copy Code
<?xml version="1.0"?>
<configuration>
   <configSections>
      <!--
         Definition of section and section groups.
      -->
   </configSections>
   <teradata.client>
      <entity>
         <storeSchemasList>
            <storeSchemas dataSource="teradata1">
               <schema database="db1" name="views" tableName="viewTable"/>
               <schema database="db1" name="viewcolumns" tableName="ViewColumnTable"/>
            </storeSchemas>
            <storeSchemas dataSource="teradata2">
               <schema database="data1" name="views" tableName="ViewTable"/>
               <schema database="data1" name="viewcolumns" tableName="ViewColumnsTable"/>
            </storeSchemas>
         </storeSchemasList>
      </entity>
   </teradata.client>
   <!--
      Other sections and section groups.
   -->
</configuration>

The <teradata.client> must be specified in the application configuration in order for the Entity Provider to include schema information for Views and ViewColumns. If it is not contained in the application configuration file, the schema information for both these store schemas will not be available to the application. This is the default behavior of the Entity Provider.

Definitions of Elements and Their Attributes

The definition for each of the elements and their attributes are as follows:

Elements and Attributes Description
<teradata.client> Element that indicates that the information is for the Teradata Provider.
<entity> Indicates that the information is related to the Entity Provider.
<storeSchemaList> Indicates that the mapping between the store schemas and tables are defined.
<storeSchemas> Defines the data source where the tables can be found. More than one <storeSchemas> can be defined. However, the value for the dataSource attribute must be unique for each of the entries. Otherwise, an exception will be thrown that indicates duplicate entries cannot be specified in the application configuration file.
      dataSource The name of the data source that contains the tables. The Entity Provider matches the name of the data source that is contained in the connection string with the data source specified in this attribute. If a match is found, the mapping is used. Otherwise, the Entity Provider will use the default behavior --the information for the store schemas will not be available.
<schema> Defines the mapping between the store schema and table. This element can only appear once for each store schema defined in the name attribute.
      database The database that contains the table mapped to the store schema.
      name The name of the store schema. The only entry that can be specified is views or viewcolumns.
      tableName The name of the table that is mapped to the store schema specified in the name attribute.

The Visual Studio Entity Data Model (EDM) Wizard

The mapping of View and ViewColumns store schemas to tables must be enabled in order to be able add views to an entity model using the EDM Wizard. This is done be adding the <teradata.client> to the devenv.exe.config file.