The SchemaLoader.exe utility is located in the bin directory of the Teradata Provider installation. This utility is used to load the information into the tables that are mapped to the Views and ViewColumns store schemas.
The primary purpose of this utility is to pre-process the information related to the ViewColumns store schema. As previously mentioned in The Views and ViewColumns Problem Overview the information for ViewColumns cannot be retrieved from the Teradata Data Dictionary. The data needs to be pre-processed before it is returned. The SchemaLoader will pre-process the information, and then load the table mapped to ViewColumns with the information required by this store schema.
The SchemaLoader.exe has the following command line options:
Option | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
/s |
Required. The connection string. There are several connection string attributes that affect the behavior of the SchemaLoader when it is processing the information that will be loaded into the tables. The following attributes have the following affect on the behavior of the SchemaLoader:
| ||||||||||
/c |
Required. The name of the table that is to be mapped to the ViewColumns store schema. | ||||||||||
/v |
Required. The name of the table that is to be mapped to the Views store schema. | ||||||||||
/d |
Optional. If the tables specified in the arguments for the /c and /v exist, they will be deleted. The SchemaLoader will not automatically drop the tables if they already exist. This option must be specified to indicate to the SchemaLoader that the tables are to be dropped if they exist. If this option has not been specified and any of the tables exist, the SchemaLoader will display an error message on the console and exit. |
The table ViewTable corresponds to the Views store schema, and ViewCol corresponds to ViewColumns. If the tables exist they will be deleted. The non-X version of the Teradata Data Dictionary views will be used, and the information for the Views and ViewColumns store schema will not be restricted to the default database.
SchemaLoader /d /v "ViewTable" /c "ViewCol" /s "DataSource=teradata1;UserId=terauser;Password=terapass;Database=TeraUser;RestrictToDefaultDatabase=false;"
The X version of the Teradata Data Dictionary views will be used and the information for the store schemas will be restricted to the default database.
SchemaLoader /s "DataSource=teradata1;UserId=terauser;Password=terapass;Database=StoreSchemaInfo;RestrictToDefaultDatabase=true;UseXViews=true" /v "SchemaViews" /c "SchemaViewColumns" /d