Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →Stream Cvent Data into Apache Kafka Topics
Access and stream Cvent data in Apache Kafka using the CData JDBC Driver and the Kafka Connect JDBC connector.
Apache Kafka is an open-source stream processing platform that is primarily used for building real-time data pipelines and event-driven applications. When paired with the CData JDBC Driver for Cvent, Kafka can work with live Cvent data. This article describes how to connect, access and stream Cvent data into Apache Kafka Topics and to start Confluent Control Center to help users secure, manage, and monitor the Cvent data received using Kafka infrastructure in the Confluent Platform.
With built-in optimized data processing, the CData JDBC Driver offers unmatched performance for interacting with live Cvent data. When you issue complex SQL queries to Cvent, the driver pushes supported SQL operations, like filters and aggregations, directly to Cvent and utilizes the embedded SQL engine to process unsupported operations client-side (often SQL functions and JOIN operations). Its built-in dynamic metadata querying allows you to work with and analyze Cvent data using native data types.
Prerequisites
Before connecting the CData JDBC Driver for streaming Cvent data in Apache Kafka Topics, install and configure the following in the client Linux-based system.
- Confluent Platform for Apache Kafka
- Confluent Hub CLI Installation
- Self-Managed Kafka JDBC Source Connector for Confluent Platform
Define a New JDBC Connection to Cvent data
- Download CData JDBC Driver for Cvent on a Linux-based system
- Follow the given instructions to create a new directory extract all the driver contents into it:
- Create a new directory named Cvent
mkdir Cvent
- Move the downloaded driver file (.zip) into this new directory
mv CventJDBCDriver.zip Cvent/
- Unzip the CData CventJDBCDriver contents into this new directory
unzip CventJDBCDriver.zip
- Create a new directory named Cvent
- Open the Cvent directory and navigate to the lib folder
ls cd lib/
- Copy the contents of the lib folder of the CData JDBC Driver for Cvent into the lib folder of Kafka Connect JDBC. Check the Kafka Connect JDBC folder contents to confirm that the cdata.jdbc.cvent.jar file is successfully copied into the lib folder
cp -r /path/to/CData JDBC Driver for Cvent/lib/* /usr/share/confluent-hub-components/confluentinc-kafka-connect-jdbc/lib/ cd /usr/share/confluent-hub-components/confluentinc-kafka-connect-jdbc/lib/
- Install the CData Cvent JDBC driver license using the given command, followed by your Name and Email ID
java -jar cdata.jdbc.cvent.jar -l
- Enter the product key or "TRIAL" (In the scenarios of license expiry, please contact our CData Support team)
- Start the Confluent local services using the command:
confluent local services start
This starts all the Confluent Services like Zookeeper, Kafka, Schema Registry, Kafka REST, Kafka CONNECT, ksqlDB and Control Center. You are now ready to use the CData JDBC driver for Cvent to stream messages using Kafka Connect Driver into Kafka Topics on ksqlDB.
- Create the Kafka topics manually using a POST HTTP API Request:
curl --location 'server_address:8083/connectors' --header 'Content-Type: application/json' --data '{ "name": "jdbc_source_cdata_cvent_01", "config": { "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector", "connection.url": "jdbc:cvent:OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;; InitiateOAuth=GETANDREFRESH", "topic.prefix": "cvent-01-", "mode": "bulk" } }'
Let us understand the fields used in the HTTP POST body (shown above):
- connector.class: Specifies the Java class of the Kafka Connect connector to be used.
- connection.url: The JDBC connection URL to connect with Cvent data.
Built-in Connection String Designer
For assistance in constructing the JDBC URL, use the connection string designer built into the CData JDBC Driver for Cvent. Either double-click the JAR file or execute the jar file from the command-line.
java -jar cdata.jdbc.cvent.jar
Fill in the connection properties and copy the connection string to the clipboard.
Before you can authenticate to Cvent, you must create a workspace and an OAuth application.
Creating a Workspace
To create a workspace:
- Sign into Cvent and navigate to App Switcher (the blue button in the upper right corner of the page) >> Admin.
- In the Admin menu, navigate to Integrations >> REST API.
- A new tab launches for Developer Management. Click on Manage API Access in the new tab.
- Create a Workspace and name it. Select the scopes you would like your developers to have access to. Scopes control what data domains the developer can access.
- Choose All to allow developers to choose any scope, and any future scopes added to the REST API.
- Choose Custom to limit the scopes developers can choose for their OAuth apps to selected scopes. To access all tables exposed by the driver, you need to set the following scopes:
event/attendees:read event/attendees:write event/contacts:read event/contacts:write event/custom-fields:read event/custom-fields:write event/events:read event/events:write event/sessions:delete event/sessions:read event/sessions:write event/speakers:delete event/speakers:read event/speakers:write budget/budget-items:read budget/budget-items:write exhibitor/exhibitors:read exhibitor/exhibitors:write survey/surveys:read survey/surveys:write
Creating an OAuth Application
After you have set up a Workspace and invited them, developers can sign up and create a custom OAuth app. See the Creating a Custom OAuth Application section in the Help documentation for more information.
Connecting to Cvent
After creating an OAuth application, set the following connection properties to connect to Cvent:
- InitiateOAuth: GETANDREFRESH. Used to automatically get and refresh the OAuthAccessToken.
- OAuthClientId: The Client ID associated with the OAuth application. You can find this on the Applications page in the Cvent Developer Portal.
- OAuthClientSecret: The Client secret associated with the OAuth application. You can find this on the Applications page in the Cvent Developer Portal.
- topic.prefix: A prefix that will be added to the Kafka topics created by the connector. It's set to "cvent-01-".
- mode: Specifies the mode in which the connector operates. In this case, it's set to "bulk", which suggests that the connector is configured to perform bulk data transfer.
This request adds all the tables/contents from Cvent as Kafka Topics.
Note: The IP Address (server) to POST the request (shown above) is the Linux Network IP Address.
- Run ksqlDB and list the topics. Use the commands:
ksql list topics;
- To view the data inside the topics, type the SQL Statement:
PRINT topic FROM BEGINNING;
Connecting with the Confluent Control Center
To access the Confluent Control Center user interface, ensure to run the "confluent local services" as described in the above section and type http://<server address>:9021/clusters/ on your local browser.
Get Started Today
Download a free, 30-day trial of the CData JDBC Driver for Cvent and start streaming Cvent data into Apache Kafka. Reach out to our Support Team if you have any questions.