skip to main content
Quick Start: Progress DataDirect Autonomous REST Connector for ODBC on Linux : Configuring a Data Source
  

Try DataDirect Drivers Now

Configuring a Data Source

The default odbc.ini file installed in the installation directory is a template in which you create data source definitions. You enter your site-specific database connection information using a text editor. Each data source definition must include the keyword Driver=, which is the full path to the driver.
The following examples show the minimum connection string options that must be set to complete a test connection, where xx represents iv for 32-bit or dd for 64-bit drivers, and yy represents the extension. The values for the options are samples and are not necessarily the ones you would use.
For sessions using an input REST file (sessions with multiple endpoints, POST requests, paging, or custom headers) with no authentication:
[ODBC Data Sources]
AutoREST=DataDirect 8.0 Autonomous REST Connector

[AutoREST]
Driver=ODBCHOME/lib/xxautorestyy.zz
Config=C:/path/to/myrest.rest
For sessions using the Sample option with no authentication:
[ODBC Data Sources]
AutoREST=DataDirect 8.0 Autonomous REST Connector

[AutoREST]
Driver=ODBCHOME/lib/xxautorestyy.zz
Sample=https://example.com/countries/
Table 3. Essential Connection Options
Connection Option Attribute
Characteristic
Required Options
Config
Specifies the name and location of the input REST file that contains the list of endpoints to sample and paging configuration information. For example, C:/path/to/mysite.rest.
For more information on information on the REST file, see "Creating a REST File for Multiple End Points."
Note: The Config property determines whether the driver uses an input REST file for the session. If no value is provided, an endpoint must be provided using the Sample property.
Sample
Specifies the endpoint that the driver connects to and samples. This option allows you to configure the driver to issue GET requests to a single endpoint without creating an input REST file.
Note: This option is required when not using an input REST file.
Optional Options
Authentication-related options
The preceding examples demonstrate connecting to an endpoint using no authentication. If your endpoint requires authentication, see Configuring Authentication for a description of related options and examples.
CreateMap
Determines whether the driver creates the internal files required for a relational map of the native data when establishing a connection.
If set to 0 (No), the driver uses the current REST file, internal files, and relational map in the location specified by the Schema Map option. If one does not exist, the connection fails.
If set to 1 (ForceNew), the driver deletes the current REST file, internal configuration files, and relational map in the location specified by the Schema Map option and creates a new set at the same location.
If set to 2 (NotExist), the driver uses the current REST file, internal files, and relational map in the location specified by the Schema Map option. If the files do not exist, the driver creates them.
If set 3 (Session), the driver uses memory to store the internal configuration information and relational map of native data. A REST file is not created when this value is specified. After the session, the view is discarded.
Default: 3 (Session)
HostName
Specifies the host name portion of the HTTP endpoint to which you send requests. Specify this value if you want to define endpoints without storing the host name component in the REST file.
SchemaMap
Specifies the directory where internal files and the relational map of native data data are written. The driver looks for this location when connecting to an endpoint. If these files do not exist, the driver creates them.
Windows default:
application_data_folder\Local\Progress\DataDirect\AutoREST_Schema\
Linux default:
~/progress/datadirect/AutoREST_Schema/