Configuration

The OData V4 Connectors package includes detailed configuration documentation for both the source and sink connector, which can be found in the following locations:

Additionally, the connectors package includes configuration template files in the etc/ subfolder:

  • odata-source-connector.properties
  • odata-sink-connector.properties

These connectors utilize extensive validators and recommenders and have been tested with the Confluent Control Center UI.

Benefits of Configuring through Confluent Control Center

The OData V4 Connectors fully support configuration through the Confluent Control Center UI. Compared to using property files, configuring through this UI offers several advantages:

  • Suggested property values
  • A comprehensive list of recommended settings
  • Incremental visibility into relevant configuration options
  • A wide range of interactive validations
  • And more

To maintain optimal performance, the Confluent Control Center UI displays a maximum of 1000 recommendations at a time. Once the required fields for a service entity are filled out in the configuration UI, a new section will appear, allowing you to configure additional service entities.

OData V4 Source Connector

OData V4 Sink Connector

Activating SAP OData Service Recommendations

For OData V4 service recommendations in the connector configuration of Confluent Control Center the SAP OData catalogue service /sap/opu/odata4/iwfnd/config/default/iwfnd/catalog/0002 must be activated in the corresponding SAP system. Additionally, the /n/IWFND/V4_ADMIN transaction must be used to publish the OData V4 catalog service.

Minimal Configuration Parameters

Service Destination Configuration

A minimal OData V4 service destination configuration looks like this:

# OData V4 server host as either DNS or IP
sap.odata.host.address = services.odata.org
# OData V4 server port
sap.odata.host.port = 443
# OData V4 protocol (supported values are http or https)
sap.odata.host.protocol = https
# OData V4 user name for basic authentication.
# For services not requiring authentication this can be set to any value.
sap.odata.user.name = anonymous
# OData V4 user password for basic authentication.
# For services not requiring authentication this can be set to any value.
sap.odata.user.pwd = anonymous

Encrypted communication is supported by using HTTPS.
The supported authentication types are basic authentication with a username and password and OAuth client credentials flow.

Service Entity Set Configuration

A minimal service entity set configuration looks like this:

# OData V4 URL service path
# To get a temporary service id, open [TripPin service](<https://services.odata.org/V4/TripPinServiceRW>) in a browser.
sap.odata#00.service = /V4/{TEMPORARY_SERVICE_ID}/TripPinServiceRW
# OData V4 entity set name
# The entity set name can be queried from the /$metadata service URL
sap.odata#00.entityset = People
# Kafka topic name the data for this OData service entity set will be pushed to
sap.odata#00.topic = People
  • The combination of service and entityset properties uniquely identifies the data set.
  • topic defines the Kafka output topic the connector producer will use to publish extracted data.

OData services can be used and queried directly by using modern web browsers. A browser can be used, e.g. for testing the service or for identifying properties and values you need to set in the connectors’ configuration.

Configuration Support with our CLI Tool

The kafka-connect-odatav4 connector`s package includes a command line interface (CLI) to help with various tasks such as:

  • Validating connector properties
  • Ping OData V4 services
  • Testing SAP® connections
  • Listing OData V4 services of an SAP system
  • Retrieving a list of entity set names for a service
  • Extracting schemas for entity sets of OData V4

Since the CLI is written in Scala you can execute it in Scala or Java.

Prerequisites

To run the CLI you need to provide the following dependencies in the CLASSPATH:

  1. Scala runtime libraries
  2. kafka-clients
  3. kafka-connect-odata connector libraries

Since a Java runtime is provided by the Confluent Platform and the Scala runtime libraries are part of the connector package, executing the CLI with Java would not require installing Scala.

Java
java -cp <kafka-connect-odatav4>:<kafka-clients>:\
<kafka-avro-serializer> \
org.init.ohja.kafka.connect.odatav4.OData4App \
<command> <options>
Scala
scala -cp <kafka-connect-odatav4>:<kafka-clients>:\
<kafka-avro-serializer> \
org.init.ohja.kafka.connect.odatav4.OData4App \
<command> <options>

The required Kafka libraries are usually located in:

  • /usr/share/java/kafka/
  • /usr/share/java/kafka-serde-tools/

Available Commands

  • ping: Test the SAP® connection.
  • list-entitysets: List all available entity sets from the SAP system.
  • list-services
  • extract-schema: Print the avro schema of an OData source. Extracting Avro schemas requires the presence of io.confluent.kafka-connect-avro-converter in the classpath.
usage:
  OData4App <command> <options>

commands:
  ping -s <relative service path>
  list-entitysets -s <relative service path>
  extract-schema -s <relative service path> -e <entity-set>
  list-services                                              (SAP only)

mandatory options:
  -p <path to connector properties file>
Note

Avro schemas may differ if the Single Message Transform(s) in the connector configuration are used.