cancel
Showing results for 
Search instead for 
Did you mean: 
Noureldin
Employee
Employee

Goal

Connect to a source supported by the CData rest API.

Solution:

  1. Download the Driver from CData URL here (Please use the Cross-Platform Unix/Linux Setup (.zip) ) or you can use the attached zip
  2. Extract on your local machine
  3. Under the extracted folder for to lib there are 2 files (cdata.jdbc.rest.jar and rssbus.jar)
  4. Upload 2 JARs to the Incorta servers (on all loader and analytics nodes)
  5. Copy cdata.jdbc.rest.jar to the following location (on all loader and analytics nodes)
    • Before 5.2.X: <Incorta_Installation>/IncortaNode/runtime/lib
    • After 5.2.X: <Incorta_Installation>/IncortaNode/extensions/connectors/customCdata
  6. Copy rssbus.jar to the following location on all loader and analytics nodes: <Incorta_Installation>/IncortaNode/runtime/lib
  7. Restart Incorta services (loader and analytics)
  8. Create Incorta Datasource
    • Driver Class: cdata.jdbc.rest.RESTDriver
    • Connection String: jdbc:rest:DataModel=Relational;URI=/<path>/<file_name>.json;Format=JSON

Note: connection string mentioned above was an example if you want to connect to JSON file from the local file system and the file should be uploaded for all Incorta nodes

Please review the below point for more setup details:

  1. To check Rest API services supported and connection string please check the CData documentation page
  2. Some Rest API services support OAuth so the Incorta Callback URL should be like https://domain.com/incorta/service/datasource/oauthRedirect
  3. For more logging you can add a dedicated log file for the CData with logging level.  Log files will be created on Incorta local storage under the specified location on all of Incorta nodes: Logfile=/<location>/<logs_file_name>.log;verbosity=2
  4. Set the verbosity level.  The verbosity level determines the amount of detail that the driver reports to the Logfile. Verbosity levels from 1 to 5 are supported. These are described in the following list:
1 Setting Verbosity to 1 will log the query, the number of rows returned by it, the start of execution and the time is taken, and any errors.
2 Setting Verbosity to 2 will log everything included in Verbosity 1, cache queries, and additional information about the request.
3 Setting Verbosity to 3 will additionally log HTTP headers, as well as the body of the request and the response.
4 Setting Verbosity to 4 will additionally log transport-level communication with the data source. This includes SSL negotiation.
5 Setting Verbosity to 5 will additionally log communication with the data source and additional details that may be helpful in troubleshooting problems. This includes interface commands.

The verbosity level should not be set to greater than 1 for normal operation. Substantial amounts of data can be logged at higher verbosities, which can delay execution times.

  • Verbosity 3: The full body of the request and the response, which includes all the data returned by the driver
  • Verbosity 4: SSL certificates
  • Verbosity 5: Any extra transfer data not included at Verbosity 3, such as non-human-readable binary transfer data

When Java logging is enabled in Logfile, verbosity will instead map to the following logging levels.

  • 0: Level.WARNING
  • 1: Level.INFO
  • 2: Level.CONFIG
  • 3: Level.FINE
  • 4: Level.FINER
  • 5: Level.FINEST

5. Advanced Logging

You may want to refine the exact information that is recorded to the log file. This can be accomplished using the LogModules property.

This property allows you to filter the logging using a semicolon-separated list of logging modules.

All modules are four characters long. Please note that modules containing three letters have a required trailing blank space. The available modules are:

  • EXEC: Query Execution. Includes execution messages for original SQL queries, parsed SQL queries, and normalized SQL queries. Query and page success/failure messages appear here as well.
  • INFO: General Information. Includes the connection string, driver version (build number), and initial connection messages.
  • HTTP: HTTP Protocol messages. Includes HTTP requests/responses (including POST messages), as well as Kerberos related messages.
  • SSL : SSL certificate messages.
  • OAUT: OAuth related failure/success messages.
  • SQL : Includes SQL transactions, SQL bulk transfer messages, and SQL result set messages.
  • META: Metadata cache and schema messages.
  • TCP : Incoming and Ongoing raw bytes on TCP transport layer messages.

An example value for this property would be.

LogModules=INFO;EXEC;SSL ;SQL ;META;

 

Best Practices Index
Best Practices

Just here to browse knowledge? This might help!

Contributors
Version history
Last update:
‎10-26-2022 08:58 AM
Updated by: