skip to main content
Using the Driver : Configuring the Relational Map : Modifying the Relational View
  

Try DataDirect Drivers Now

Modifying the Relational View

Note: You can modify the relational view only if your session uses REST files. For sessions that use internal memory to map the relational view (CreateMap=3), the following functionality is not supported.
You can manually edit the resolved REST file to modify the relational view of your data, including adding/removing endpoints or updating the primary key. When you first issue a SQL command for a session, the driver overwrites the resolved REST file to the location specified by the Schema Map option (SchemaMap). To persist your changes, you will need to move the edited REST file to the location specified by the REST Config File option. This procedure will guide you through the process of modifying the REST file.
To modify your REST file:
1. Copy the REST file in the location specified by the Schema Map option to a new location or the current location specified by the REST Config File (RestConfigFile) option. Note, if moving the file to a different location, the driver must have read access to the new directory.
2. Edit the contents of the copied REST file to do either of the following:
*Designate the primary key for a table. See Designating the Primary Key for details.
*Add/remove endpoints from the map. See Adding/Removing Objects for details.
3. Set the REST Config File option to specify the name and location of the edited REST file.
4. Set the Create Map (CreateMap) option to 1 (ForceNew).
Note: After completing this procedure, set the Create Map option to your preferred setting.
5. Use the driver to execute any SQL command to regenerate the resolved REST file.
The resolved REST file, and therefore your relational view, now includes your modifications. If you need to make additional modifications, repeat the steps discussed in this procedure.
* Designating the Primary Key
* Adding/Removing Objects