Generic OData Driver

Building the JDBC URL

After installing your license, launch the connection management page by navigating to the directory containing the driver JAR and running the command java -jar kingswaysoft.jdbc.jar.

Once launched, select JDBC Connection Manager. Enter the required details, and the program will automatically generate your JDBC connection URL. You can then use the Test Connection button to verify the URL and the Copy to Clipboard button to easily use the connection string in your application.

Note: If no license is installed, the connection manager can still generate a JDBC URL, but the Test Connection feature will be disabled.

General Page

The General page on the Generic OData Connection Manager allows you to specify the general settings for the connection.

connectionmanage

Server Information
Base URL

The URL field represents the address of the web service to connect to.

General Settings
Timeout (secs)

The Timeout (secs) option allows you to specify a timeout value in seconds for the connection. The default value is 120 seconds. Specify 0 for an infinite timeout.

Chunk Size (in KB)

The chunk size to use when sending web requests. When set to 0, chunking will not be used.

API Throttling Rate

The API Throttling Rate will limit the number of requests that can be sent per the unit of time selected. This is useful when accessing APIs with request limits.

To set the unit of time for throttling, expand the dropdown by requests. This will also set the connection property ThrottleRateUnit.

Custom Headers

The Custom Headers grid will allow HTTP headers to be entered that will be used for each request.

Authentication Methods for the Generic OData Driver

AWS Signature
AWS Signature Settings
Signature Version

Specify between Version 4 and Version 2.

Version 4

Provide an Access Key, Access Secret, Session Token, Service Name, and select an AWS region to establish a connection.

AWS Signature Settings
Access Key

The Access key to be used for authentication.

Access Secret

Provide the Access secret to be used for authentication.

Session Token

The Session Token option allows you to specify a temporary security token, known as temporary security credentials. Note this property is optional.

AWS Region

The AWS Region for the web service endpoint.

Service Name

The AWS service name to be provided.

Version 2

Provide an Access Key, Access Secret, Session Token, and select a Signature Method to establish a connection.

AWS Signature Settings
Access Key

The Access key to be used for authentication.

Access Secret

Provide the Access secret to be used for authentication.

Session Token

The Session Token option allows you to specify a temporary security token, known as temporary security credentials. Note this property is optional.

Signature Method
Choose between available Signature Methods
  • HMAC-SHA1
  • HMAC-SHA256
Azure OAuth

Authentication Mode: Azure OAuth

OAuth Type

The OAuth Type can be chosen between the below.

  • Certificate
  • Client Credentials
Authorization URL

Endpoint where a user is redirected to authenticate and grant permission to access protected resources.

Certificate

Use a Tenant ID, Client ID, and Scope together with a saved Certificate File and Certificate Password to establish a connection.

NOTE: Only PFX format is supported for the certificate file. When certificates are newly generated, a PEM file is also created; configure this PEM file in the portal.

Authentication
Tenant ID

Provide tenant identifiers such as the tenant ID or domain name for your Microsoft organization. A default value "common" is used when no value is provided.

Client ID

The Application ID of the Azure Active Directory App.

Path to Certificate

Provide the path to the certificate file to use for authentication. Click the ellipses button to browse their file system for the certificate.

Certificate Password

Provide the password to the certificate file.

Scope

Set Scope to identify the set of resources and operations that the selected certificate permits. The value passed for the scope parameter in this request should be the resource identifier (Application ID URI) of the resource you want, affixed with the .default suffix.

Client Credentials

Use a Tenant ID, Client ID, and Scope with a Client Secret to establish a connection.

Azure OAuth
Tenant ID

Provide tenant identifiers such as the tenant ID or domain name for your Microsoft organization. A default value "common" is used when no value is provided.

Client ID

The Application ID of the Azure Active Directory App.

Client Secret

The Application Secret that you generated for your app in the app registration portal.

Scope

Set Scope to identify the set of resources and operations that an access token permits. The value passed for the scope parameter in this request should be the resource identifier (Application ID URI) of the resource you want, affixed with the .default suffix.

Basic

Use your instance URL with a Username and Password to establish a connection.

Authentication Mode: Basic

Basic authentication adds a basic authentication header to web requests. The HTTP Connection Manager will append the Base64 encoded string value representing your username and password to the text "Basic" in the request Authorization header.

Credentials
Username

The Username to use when accessing the web service.

Password

The Password to use when accessing the web service.

Bearer Token

Use a Bearer Token to establish your connection. This token lets you authenticate requests using a static access key.

Authentication Mode: Bearer Token

Bearer Token

The Bearer Token allows requests to authenticate using a static access key. HTTP Connection Manager will append the token value to the text "Bearer " in the required format to the request Authorization header.

Credentials (Basic, Digest, NTLM)

Use your instance URL along with your Domain, Username, and Password to establish a connection.

Authentication Mode: Credentials
Domain

The domain or host to authenticate against.

Username

The Username option allows you to specify the user account that you want to use when connecting to the specified server.

Password

The Password option allows you to specify the password for the above user account to log in to the specified server.

Custom Token

Use a custom token obtained via a CURL command. The CURL command sends a request and returns a response. The TokenStrategy and TokenExpression define the path to the desired value. Click the Test Custom Token button to open a window where you can inspect the CURL file and test the token request. The token can then be used by specifying @Connection[AccessToken] in the supported connection properties.

Custom Access Token Settings
CURL Source

The CURL Source contains two allows options:

  • File: Provide a local file for the curl command.
  • Manually Enter: Fill in the command text.
CURL File

Provide the location to a file that contains a token request CURL command.

CURL Command Text

Provide the CURL command to get the authorization token.

Find Token Strategy

Provide the find token strategy by specifying one from the below.

  • JPath
  • XPath
  • Regex
  • Header
Find Token Expression

Provide the JPath, XPath, expression, etc. that can be used to extract the token value from the response.

Token Expiry

Manually specify the token expiry in seconds.

Test Custom Token

Click on this button to open up the below screen in which you can parse through the CURL File and test the token request.

Note: The Custom Access Token works by making a web request to retrieve an authorization token using a CURL command from a file. After the request is made the token is extracted from the response using one of the 'Find Token Strategies' and a 'Find Token Expression'. Once the token is extracted from the response it will be available for use by specifying '@Connection[AccessToken]' in supported connection properties or supported component properties. The token is re-retrieved after the specified expiry time in seconds.

Google Service Account

Use a JSON Key File Path along with a Scope to establish a connection.

Google Service Account

The Service Account option allows you to specify the account which will be used to connect to your Google service.

Certificate Location (Only for Certificate type OAuth type)

The certificate location can be either of the below.

  • Store
  • File System
Path to File System

Provide the path to the certificate file to use for authentication. Click the ellipses button to browse their file system for the certificate. This option is available when you choose File System as Certificate Location.

Note: The component supports Azure Blob Shared Access Signature (SAS) URL in the certificate path.

Certificate Password

Provide the password to the certificate file. This option is available when you choose File System as the Certificate Location.

Certificate Thumbprint

This option allows you to specify the thumbprint of the selected certificate to authenticate using your Google Service Account.

Scope

Set Scope to identify the set of resources and operations that an access token permits.

JWT

Use a JWT (JSON Web Token) to establish a connection. You can import the token using the Import Claims From Existing JWT button or enter it manually in the provided table.

Authentication Mode: JWT
Import Claims from Existing JWT...

Clicking on this button will open up the below page to import claims from existing JWT.

JWT Claims

The grid contains the following columns

  • Claim Name
  • Claim Value
  • Header (checkbox)
JWT Secret

Provide the JWT Secret.

Kerberos

Use your instance URL along with your Domain, Username, and Password to establish a connection.

Authentication Mode: Kerberos
Domain

The domain or host to authenticate against.

Username

The Username option allows you to specify the user account that you want to use when connecting to the specified server.

Password

The Password option allows you to specify the password for the above user account to log in to the specified server.

None

Use this option when your request does not require authorization.

OAuth 1

Establish a connection using the OAuth 1.0 method by selecting a signature method and entering the required credentials.

  • For HMAC signature methods, provide a Consumer Key, Consumer Secret, Access Token, and Token Secret.
  • For RSA signature methods, provide a Consumer Key, Access Token, and Private Key.
Authentication Mode: OAuth 1
Generate Token file...

The Generate Token File... button takes you to the OAuth token generator.

Path to Token File

The path to the token file on the file system.

Token File Password

The Password for the token file.

OAuth 2

Use a saved token file along with its token password to establish a connection. To generate a new token file, click Generate Token File and follow the on-screen process. After saving the token file locally, enter the token password to connect. A dropdown menu allows you to customize where the access token appears in your request.

Authentication Mode: OAuth 2
Generate Token file...

The Generate Token File... button directs you to the OAuth token generator.

Path to Token File

The path to the token file on the file system.

Token File Password

The Password for the token file.

Put Access Token In

In the part of the web request where the token should go, the below options available:

  • HTTP Header
  • Query String
  • Custom

Note: The "Custom" access token location option is designed to work for advanced scenarios where the injection of the access token received from the OAuth authentication flow needs to be managed in a very particular way, such as inserting it in your HTTP request body, or using it in a different HTTP header or query string parameter (other than the standard OAuth Authorization HTTP header or query string parameter). Note that when using this option, where the access token is actually placed will depend on your implementation at the component level by using the @Connection[AccessToken] variable; otherwise, the token will be ignored. Supported components include Web Service/XML/JSON components.

OAuth Client Credentials

Use your ClientId, ClientSecret, Scope, and TokenUrl to establish an OAuth connection. A dropdown menu lets you customize the placement of the access token in the request.

Authentication Mode: OAuth Client Credentials
Client ID

The Client ID OAuth parameter.

Client Secret

The Client Secret OAuth parameter.

Scope

The Scopes may be set optionally for the level of access an application will have for a resource.

Request Tokens URL

The base URL to request tokens from.

Basic Authentication

The Basic Authentication can be enabled to send client credentials over authorization header rather than request body.

Put Access Token In

In the part of the web request where the token should go, the below options available:

  • HTTP Header
  • Query String
  • Custom

Note: The "Custom" access token location option is designed to work for advanced scenarios where the injection of the access token received from the OAuth authentication flow needs to be managed in a very particular way, such as inserting it in your HTTP request body, or using it in a different HTTP header or query string parameter (other than the standard OAuth Authorization HTTP header or query string parameter). Note that when using this option, where the access token is actually placed will depend on your implementation at the component level by using the @Connection[AccessToken] variable; otherwise, the token will be ignored. Supported components include Web Service/XML/JSON components.

Static Token

Use your Token Name and Token Value to establish a connection. You can also use the dropdown to customize where the access token appears in the request.

Authentication Mode: Static Token
Static Token authentication uses a fixed predefined token or API Key that is expected to remain the same for continuous authentications.
Put Access Token In

In the part of the web request where the token should go, there are three options available:

  • HTTP Header
  • Query String
  • Custom

Note: The "Custom" access token location option is designed to work for advanced scenarios where the injection of the access token received from the OAuth authentication flow needs to be managed in a very particular way, such as inserting it in your HTTP request body, or using it in a different HTTP header or query string parameter (other than the standard OAuth Authorization HTTP header or query string parameter). Note that when using this option, where the access token is actually placed will depend on your implementation at the component level by using the @Connection[AccessToken] variable; otherwise, the token will be ignored. Supported components include Web Service/XML/JSON components.

Token Name

The Token Name is the unique identifier to reference the authentication token.

Token Value

The Token Value is the secret key or string used for authentication.

Windows Integrated Authentication

No credential input is required. This method automatically uses the credentials of the currently signed-in user.

WSSE

Use your Username and Password to establish a connection using WSSE.

Username

The Username to use when accessing the web service.

Password

The Password to use when accessing the web service.

Test Connection

After all the connection information has been provided, click the "Test Connection" button to test if the user credentials entered can successfully connect to the selected service.

OData Settings Page

OData Settings

The ODataSettings page on the OData Connection Manager allows you to specify some specific and optional settings for the connection.

connectionmanage

Query Settings
Max Binding Depth

The Max Binding Depth option allows you to specify how deep you would like to go to discover additional bindings.

Omit $select parameter

When the Omit $select parameter setting is enabled, the $select parameter will not be sent in requests, causing all available attributes to be returned

Multipart Headers

In this section you can specify headers to be used when performing batch update or delete queries. Headers specified in this section will be included for each item in the batch request.

Service Implementation
Service Implementation
The Service Implementation can be picked out of the five options:
  • CDS/Dynamics 365 Customer Engagement
  • Generic
  • Generic - 'Next Link' Paging
  • Microsoft Graph
  • SharePoint

Proxy Settings Page

The Proxy Settings page on the Generic OData Driver Connection Manager allows you to specify some advanced and optional settings for the connection.

Proxy Server Settings

connectionmanage

Proxy Mode

The Proxy Mode option allows you to specify how you want to configure the proxy server setting. There are three options available.

  • No Proxy
  • Auto-detect (Using system-configured proxy)
  • Manual
Proxy Server

Using the Proxy Server option allows you to specify the name of the proxy server for the connection.

Port

The Port option allows you to specify the port number of the proxy server for the connection.

Username (Proxy Server Authentication)

The Username option (under Proxy Server Authentication) allows you to specify the proxy user account.

Password (Proxy Server Authentication)

The Password option (under Proxy Server Authentication) allows you to specify the proxy user's password.

Advanced Settings Page

The Advanced Settings page allows you to specify advanced settings for the connection.

Advanced Settings

connectionmanage

Client Certificate
Path to Certificate

Provide the path to the certificate file to use for authentication. Click the ellipses button to browse their file system for the certificate.

Certificate Password

Provide the password to the certificate file.

Miscellaneous Settings
Ignore Certificate Errors

This option can be used to ignore those SSL certificate errors when connecting to the target server.

Warning: Enabling the "Ignore Certificate Errors" option is generally NOT recommended, particularly for production instances. Unless there is a strong reason to believe the connection is secure - such as the network communication is only happening in an internal infrastructure, this option should be unchecked for best security.

Note: When this option is enabled, it applies to all HTTP-based SSL connections in the same job process.

Concurrent Writing Threads

This option can be used to set the number of threads to be used during write operations. This can improve performance during large-volume write operations.

Retry on Intermittent Errors

The retry on intermittent errors determines if requests will be retried when there is an error. If this option is checked requests will be retried up to 3 times.

Allow Auto Redirect

The allow auto redirect option determines if requests will be automatically redirected when receiving a server-side redirect.

Drop Authorization Header on Redirects

Allows you to specify whether to drop the authorization header on any redirects.

Using the JDBC Driver

This section provides detailed examples of how to use JDBC classes (like Connection, Statement, and ResultSet) to interact with OData data. You will find examples for both regular and prepared statements to handle complex or frequently executed queries.

Executing Statements

After you have connected from your code, you can execute SQL statements using the Statement class. For connection details, see Connecting with DriverManager or Connecting with DataSource. For parameterized statements, see Executing Prepared Statements.

SELECT

Use the executeQuery (or generic execute) method of the Statement class to run SQL statements that returns data. After executing the query, retrieve the results by calling the getResultSet method.

String sql = "SELECT * FROM People WHERE UserName = 'russellwhyte'";
try {
    ResultSet resultSet = statement.executeQuery(sql);
    LOGGER.info(resultSet.toString());
} catch (SQLException e) {
    LOGGER.severe(e.toString());
}

INSERT

Use the Statement class's executeUpdate (or generic execute) method to perform an INSERT operation. After execution, retrieve the results from the getResultSet method to view the inserted record's ID, any errors, and details of the affected data.

String sql = "INSERT INTO People (UserName, FirstName, LastName, Gender, Emails) "
           + "VALUES ('Name', 'First', 'Last', 'Male', '[email protected]')";
try {
    statement.executeUpdate(sql);
    LOGGER.info(statement.getResultSet().toString());
} catch (SQLException e) {
    LOGGER.severe(e.toString());
}
UserName,errorcode,errormessage,processdata,haserrors
Name,null,null,{"UserName":"Name","FirstName":"First","LastName":"Last","Gender":"Male","Emails":["[email protected]"]},false

UPDATE

Use the executeUpdate (or generic execute) method of the Statement class to perform an UPDATE operation. After the update, retrieve the results with the getResultSet method to view the updated record's ID, any errors encountered, and details of the changes made.

String sql = "UPDATE People "
           + "SET FirstName = 'UpdateFirst', LastName = 'UpdateLast', Emails = '[email protected]' "
           + "WHERE UserName = 'Name'";
try {
    statement.executeUpdate(sql);
    LOGGER.info(statement.getResultSet().toString());
} catch (SQLException e) {
    LOGGER.severe(e.toString());
}
UserName,errorcode,errormessage,processdata,haserrors
Name,null,null,{"FirstName":"UpdateFirst","LastName":"UpdateLast","Emails":["[email protected]"]},false

DELETE

Use the executeUpdate (or generic execute) method of the Statement class to run a DELETE operation. Then, use the getResultSet method to check the deleted record's ID, any errors, and information on what was removed.

String sql = "DELETE FROM People WHERE UserName = 'Name'";
try {
    statement.executeUpdate(sql);
    LOGGER.info(statement.getResultSet().toString());
} catch (SQLException e) {
    LOGGER.severe(e.toString());
}
UserName,errorcode,errormessage,processdata,haserrors
Name,null,null,{},false

Executing Prepared Statements

PreparedStatements can boost performance when running the same SQL statement multiple times with different parameters. Unlike a regular Statement, a PreparedStatement is created with a SQL statement that you can execute repeatedly with dynamic values. This special type of statement is derived from the more general Statement class.

Below are the steps outlining how to execute a prepared statement:

Creating and Executing a Prepared Statement
  1. Create a PreparedStatement
  2. Set Parameters
    • Declare parameters by calling the corresponding setter method of the PreparedStatement.
    • NOTE: The parameter indices start at 1.
  3. Execute the PreparedStatement
    • Use the generic execute or executeUpdate method of the PreparedStatement.
  4. Retrieve Results
    • Call the getResultSet method of the PreparedStatement to obtain the query results, which are returned as a ResultSet.
  5. Iterate Over the Result Set
    • Use the next method of the ResultSet to iterate through the results. To obtain column information, use the ResultSetMetaData class. Instantiate a ResultSetMetaData object by calling the getMetaData method of the ResultSet.

SELECT

Use the executeQuery (or generic execute) method of the PreparedStatement class to run SQL statements that returns data. After executing the query, retrieve the results by calling the getResultSet method.

String sql = "SELECT * FROM People WHERE UserName = ?";
try {
    PreparedStatement ps = connection.prepareStatement(sql);
    ps.setString(1, "russellwhyte");
    ps.execute(sql);
    while (ps.getResultSet().next()) {
        for (int i = 1; i <= ps.getResultSet().getMetaData().getColumnCount(); i++) {
            LOGGER.info(ps.getResultSet().getMetaData().getColumnLabel(i) + "="
            + ps.getResultSet().getString(i));
        }
    }
} catch (SQLException e) {
    LOGGER.error(e);
}

INSERT

Use the PreparedStatement class's executeUpdate (or generic execute) method to perform an INSERT operation. After execution, retrieve the results from the getResultSet method to view the inserted record's ID, any errors, and details of the affected data.

String sql = "INSERT INTO People (UserName, FirstName, LastName, Gender, Emails) VALUES (?, ?, ?, ?, ?)";
try {
    PreparedStatement ps = connection.prepareStatement(sql);
    ps.setString(1, "Name");
    ps.setString(2, "First");
    ps.setString(3, "Last");
    ps.setString(4, "Male");
    ps.setString(5, "[email protected]");
    ps.executeUpdate();
    LOGGER.info(ps.getResultSet().toString());
} catch (SQLException e) {
    LOGGER.error(e);
}
UserName,errorcode,errormessage,processdata,haserrors
Name,null,null,{"UserName":"Name","FirstName":"First","LastName":"Last","Gender":"Male","Emails":["[email protected]"]},false

UPDATE

Use the executeUpdate (or generic execute) method of the PreparedStatement class to perform an UPDATE operation. After the update, retrieve the results with the getResultSet method to view the updated record's ID, any errors encountered, and details of the changes made.

String sql = "UPDATE People SET FirstName = ?, LastName = ?, Emails = ? WHERE UserName = ?";
try {
    PreparedStatement ps = connection.prepareStatement(sql);
    ps.setString(1, "UpdateFirst");
    ps.setString(2, "UpdateLast");
    ps.setString(3, "[email protected]");
    ps.setString(4, "Name");
    ps.executeUpdate();
    LOGGER.info(ps.getResultSet().toString());
} catch (SQLException e) {
    LOGGER.error(e);
}
UserName,errorcode,errormessage,processdata,haserrors
Name,null,null,{"FirstName":"UpdateFirst","LastName":"UpdateLast","Emails":["[email protected]"]},false

DELETE

Use the executeUpdate (or generic execute) method of the PreparedStatement class to run a DELETE operation. Then, use the getResultSet method to check the deleted record's ID, any errors, and information on what was removed.

String sql = "DELETE FROM People WHERE UserName = ?";
try {
    PreparedStatement ps = connection.prepareStatement(sql);
    ps.setString(1, "Name");
    ps.executeUpdate();
    LOGGER.info(ps.getResultSet().toString());
} catch (SQLException e) {
    LOGGER.error(e);
}
UserName,errorcode,errormessage,processdata,haserrors
Name,null,null,{},false

Metadata Discovery

This section provides examples on how to retrieve table and column metadata using the getTables, getColumns, and getPrimaryKeys methods from the DatabaseMetaData interface. These are essential for discovering database structures.

Tables

The getTables method from the DatabaseMetaData interface can be used to retrieve a list of tables.

This method only retrieves tables that are not write-only.

To get a list of tables that includes write-only tables, query the table system.tables.

try {
    Connection connection = buildRestConnectionFromDriverManager();
    ResultSet rs = connection.getMetaData().getTables(null, null, null, null);
    LOGGER.info("\r\n" + rs.toString());
} catch (SQLException e) {
    LOGGER.severe(e.getMessage());
}
TABLE_CAT,TABLE_SCHEM,TABLE_NAME,TABLE_TYPE,REMARKS
null,null,Airlines,Table,null
null,null,Airports,Table,null
null,null,Me,Table,null
null,null,Me/Friends,Table,null
null,null,Me/Photo,Table,null
null,null,Me/Trips,Table,null
null,null,People,Table,null
null,null,People/Friends,Table,null
null,null,People/Photo,Table,null
null,null,People/Trips,Table,null
......

The getTables method returns the following metadata columns:

Column Name Data Type Description
TABLE_CAT String The catalog that contains the table.
TABLE_SCHEM String The schema of the table.
TABLE_NAME String The name of the table.
TABLE_TYPE String The type of the table (e.g., TABLE or VIEW).
REMARKS String An optional description of the table.

Columns

Use the getColumns method of the DatabaseMetaData interface to retrieve detailed information about database columns. To narrow the results to a specific table, specify the table name using the parameter table_name.

This method returns columns only for tables that are not write-only.

To get columns for write-only tables, query the table system.columns.

try {
    Connection connection = buildRestConnectionFromDriverManager();
    ResultSet rs = connection.getMetaData().getColumns(null, null, "People", null);
    LOGGER.info(rs.toString());
} catch (SQLException e) {
    e.printStackTrace();
}
TABLE_CAT,TABLE_SCHEM,TABLE_NAME,COLUMN_NAME,DATA_TYPE,TYPE_NAME,COLUMN_SIZE,BUFFER_LENGTH,DECIMAL_DIGITS,NUM_PREC_RADIX,NULLABLE,REMARKS,COLUMN_DEF,SQL_DATA_TYPE,SQL_DATETIME_SUB,CHAR_OCTET_LENGTH,ORDINAL_POSITION,IS_NULLABLE,IS_AUTOINCREMENT,IS_GENERATEDCOLUMN,DTS_TYPE
null,null,People,AddressInfo,12,VARCHAR,null,null,0,0,null,null,null,12,null,null,null,null,null,null,DT_WSTR
null,null,People,Concurrency,-5,BIGINT,null,null,0,0,null,null,null,-5,null,null,null,null,null,null,DT_I8
null,null,People,Emails,12,VARCHAR,null,null,0,0,null,null,null,12,null,null,null,null,null,null,DT_WSTR
null,null,People,FirstName,12,VARCHAR,null,null,0,0,null,null,null,12,null,null,null,null,null,null,DT_WSTR
null,null,People,Friends,12,VARCHAR,null,null,0,0,null,null,null,12,null,null,null,null,null,null,DT_WSTR
null,null,People,Gender,12,VARCHAR,null,null,0,0,null,null,null,12,null,null,null,null,null,null,DT_WSTR
null,null,People,LastName,12,VARCHAR,null,null,0,0,null,null,null,12,null,null,null,null,null,null,DT_WSTR
null,null,People,Photo,12,VARCHAR,null,null,0,0,null,null,null,12,null,null,null,null,null,null,DT_WSTR
null,null,People,Trips,12,VARCHAR,null,null,0,0,null,null,null,12,null,null,null,null,null,null,DT_WSTR
null,null,People,UserName,12,VARCHAR,null,null,0,0,null,null,null,12,null,null,null,null,null,null,DT_WSTR

The getColumns method returns the following columns:

Column Name Data Type Description
TABLE_CAT String The database name.
TABLE_SCHEM String The table schema.
TABLE_NAME String The table name.
COLUMN_NAME String The column name.
DATA_TYPE Integer The data type represented by a constant value from java.sql.Types.
TYPE_NAME String The data type name used by the driver.
COLUMN_SIZE Integer The length in characters of the column or the numeric precision.
BUFFER_LENGTH Integer The buffer length.
DECIMAL_DIGITS Integer The column scale or number of digits to the right of the decimal point.
NUM_PREC_RADIX Integer The radix, or base.
NULLABLE Integer Whether the column can contain null as defined by the following JDBC DatabaseMetaData constants: columnNoNulls (0) or columnNullable (1).
REMARKS String The comment or note associated with the object.
COLUMN_DEF String The default value for the column.
SQL_DATA_TYPE Integer Reserved by the specification.
SQL_DATETIME_SUB Integer Reserved by the specification.
CHAR_OCTET_LENGTH Integer The maximum length of binary and character-based columns.
ORDINAL_POSITION Integer The position of the column in the table, starting at 1.
IS_NULLABLE String Whether a null value is allowed: YES or NO.
IS_AUTOINCREMENT String Whether the column value is assigned by OData in fixed increments.
IS_GENERATEDCOLUMN String Whether the column is generated: YES or NO.
DTS_TYPE String Object DTS attribute type.

Primary Keys

The getPrimaryKeys method in the DatabaseMetaData interface is used to retrieve metadata about primary keys for a given table in OData.

try {
    Connection connection = buildRestConnectionFromDriverManager();
    ResultSet resultSet = connection.getMetaData().getPrimaryKeys(null, null, "People");
    LOGGER.info("\r\n" + resultSet.toString());
} catch (SQLException e) {
    LOGGER.severe(e.getMessage());
}
TABLE_NAME,PRIMARY_COLUMN_NAME
People,UserName

The getPrimaryKeys method returns the following columns:

Column Name Data Type Description
TABLE_NAME String The name of the table that contains the primary key.
PRIMARY_COLUMN_NAME String The name of the column that serves as the primary key for the table.

Connection Settings

Connection Setting Type Default Value Description
AccessKey String "" A unique identifier used to authenticate API requests in cloud services like AWS.
AccessSecret String "" A secret key associated with the AccessKey for secure sign-in requests to cloud services.
AccessToken String "" The AccessToken is used to authenticate access to OData.
AccessTokenSecret String "" A secret key paired with the AccessToken to sign API requests and confirm integrity.
AllowAutoRedirect Boolean true Whether the HTTP client should automatically follow redirect when the server responds with a redirect status.
ApiKey String "" The ApiKey is the unique identifier used for authenticating API requests to access OData resources.
ApiThrottleRate Integer 0 The maximum number of API requests a client can make to the server within a specific time period, defined in the ThrottleRateUnit setting. A value of 0 will disable throttling.
AuthenticationMode String "AuthorizationCode" AuthenticationMode specifies the method used to authenticate when connecting to OData OData API.
AWSRegion String "" The geographical region where the AWS resources are hosted.
AzureAuthorizationUrl String "https://login.microsoftonline.com" The endpoint where a user is redirected to authenticate and grant permission to access protected resources.
AzureCertificatePassword String "" The password associated with the certificate file for decryption.
AzureOAuthType String "Certificate" The method used for authenticating a client to an authorization server.
AzureResource String "" The Application ID URI of the protected service for which an access token is requested.
AzurePathToCertificate String "" The file path to a certificate used for encrypted communication during connection.
BaseUrl String "" The root URL or endpoint of the API or service being connected.
BasicAuth Boolean false Whether the credentials are encoded in the HTTP header for connection verification.
BearerToken String "" A token provided to grant API requests access to resources.
BulkPollingInterval Integer 5 How often the component checks the job status until the job status is COMPLETE.
CacheExpirationTime Integer 30 Defines the expiration time for cache. A value of 0 disables caching.
CertificatePassword String "" The password associated with the certificate file for decryption.
ChunkSize Integer 0 The size of data chunks that are sent or received in an API request or response. A value of 0 will disabling chunking.
ClientId String "" A unique identifier for the application or client making requests to an API.
ClientSecret String "" A secret key used with the ClientId to authenticate a client in OAuth
ConcurrentWritingThreads Integer 1 The number of threads for executing operations in parallel. A value of 0 will disable multi-threading.
ConnectionTimeout Integer 30 ConnectionTimeout is the maximum amount of time the program will wait to set up a connection to the OData API.
ConsumerKey String "" A public identifier for the client making the API request.
ConsumerSecret String "" A private key associated with the ConsumerKey used to securely authenticate the client.
CurlCommandText String "" The CURL command in text form used to test the connection to an API. It includes details such as HTTP method, headers, and any payload.
CurlFilePath String "" The file path to a CURL file containing predefined settings for sending requests.
CurlSource String "" The source of the CURL command and whether the CurlFilePath or CurlCommandText is being used.
CustomHeaders String "" A JsonNode String of header key value pairs used in requests.
Domain String "" The domain name or host being connected to.
DropAuthHeader Boolean false Whether or remove or ignore the authentication header in the request.
GoogleCertificatePassword String "" The password associated with the certificate file for decryption.
GoogleJsonKeyFile String "" The GoogleJsonKeyFile option specifies the file path for the JSON key file that is used when connecting using a Google Service Account.
GooglePathToCertificate String "" The file path to a certificate used for encrypted communication during connection.
IgnoreCertificateErrors Boolean false Specifies whether to verify the certificate when connecting to OData. If certificate verification is not required, you can set this value to 'true'.
ContinueOnErrors Boolean false Determines if the program continues executing SQL statements after encountering an error.
JwtClaims String "" The claims encoded within a JSON Web Token (JWT).
JwtKeyFile String "" A file containing a key used to sign or verify the JWT.
JwtSecret String "" A secret key used in signing and verification of JWTs.
JwtSource String "" The source from which the JWT is obtained.
LogFileSize String "10485760" A string specifying the maximum size in bytes for a log file.
LogLevel String "INFO" The logging level for the JDBC driver.
LogPath String "./jdbcLogs" The directory where log files are stored.
MaxBindingDepth Integer 1 MaxBindingDepth refers to the maximum depth allowed for a OData query to avoid performance issues.
MultipartCustomHeaders String "" A JsonNode containing key/value pairs for custom headers. These headers are used when performing batch actions that send multipart requests. Using this property, you can set the custom headers that will be sent for each record in a batch request.
OemKey String "" The OEM license key.
OmitSelectParameter Boolean false When enabled, the $select parameter will not be sent in requests, causing all available attributes to be returned. When disabled, the $select parameter will be sent and only contain fields that were specified in the query.
Password String "" The password used to authenticate the user.
PathToCertificate String "" The file path to a certificate used for encrypted communication during connection.
PathToPrivateKey String "" The private key file path for authentication when using an RSA based Signature Method.
PathToTokenFile String "" The file path where a token is stored.
ProxyMode String NoProxy This setting configures the proxy. Allowed values are "NoProxy", "AutoDetect" and "Manual".
ProxyPassword String "" The password to be used to authenticate to the proxy.
ProxyServer String "" The host of the proxy server.
ProxyServerPort Integer 0 The port of the proxy server.
ProxyUsername String "" The username to be used to authenticate to the proxy.
ReadBatchSize Integer 100 ReadBatchSize is used to set how many records can be read from OData in a single call.
Realm String "" A domain within which authentication and authorization processes occur.
ResultPath String "" The path where the execution result files are saved.
RetryOnIntermittentErrors Boolean true The RetryOnIntermittentErrors parameter indicates whether to retry the connection when it might occasionally fail due to temporary issues.
SaveResult Boolean false The SaveResult parameter indicates whether to save the execution results to a file.
Scope String "" The access level or permissions granted for a token.
ServiceAccount String "" A account used to authenticate and authorize a service to interact with APIs.
ServiceImplementation String "Generic" The Service Implementation option specifies which OData protocol version and behavior pattern the driver should follow when communicating with the target service.
ServiceName String "" The ServiceName refers to the name of the service API selected by the user.
ServiceNameAWS String "" The name of the name of the AWS service selected by the user.
ServiceTimeout Integer 120 The ServiceTimeout is the timeout to receive the full response from OData API.
SessionToken String "" A temporary security token used with the AccessKey and AccessSecret for temporary credentials.
SignatureMethod String "" The method used to sign API requests for authentication.
SignatureVersion Integer 4 The version of the signature algorithm used to authenticate requests.
StaticTokenName String "" The name of the static token.
StaticTokenValue String "" The value of the static token.
Suppress404NotFoundError Boolean true When set to true, if a query results in an HTTP 404 error, a result set will still be created. When set to false, an error is logged instead and no result set is created.
TenantId String "" An identifier for a specific tenant, used to distinguish users or organizations.
ThrottleRateUnit String "PerSecond" The unit of time for limiting API requests to avoid being throttled. Valid values include, "PerSecond", "PerMinute" and "PerHour".
TokenExpiry Integer 0 The expiration time or validity period of a token, after which the token becomes invalid and needs to be refreshed or reissued.
TokenExpression String "" A specified expression or rule used to extract or manipulate the token from the CURL response.
TokenLocation String "" The TokenLocation option allows you to specify where the token should be placed in a request. Valid values are "Http Header", "Query String" and "Custom". Custom allows you to place the token in a user specified location in the Base URL or Header by using @Connection[AccessToken] to represent the token. Example of use in Base URL: to set the token to a user defined parameter on the base URL: https://example.com?customTokenLocation=@Connection[AccessToken]
TokenPassword String "" A password associated with the token used for encryption and decryption.
TokenStrategy String "" The approach used for handling the CURL request response.
TokenUrl String "" The URL endpoint used to request or obtain a token.
UserEmail String "" The email specifies the user account used for OAuth JWT connection to OData.
UserName String "" The user account used to connect to the server.
WriteBatchSize Integer 200 WriteBatchSize is used to set how many records can be written to OData in a single call.