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.

  1. Confluent Platform for Apache Kafka
  2. Confluent Hub CLI Installation
  3. Self-Managed Kafka JDBC Source Connector for Confluent Platform

Define a New JDBC Connection to Cvent data

  1. Download CData JDBC Driver for Cvent on a Linux-based system
  2. Follow the given instructions to create a new directory extract all the driver contents into it:
    1. Create a new directory named Cvent mkdir Cvent
    2. Move the downloaded driver file (.zip) into this new directory mv CventJDBCDriver.zip Cvent/
    3. Unzip the CData CventJDBCDriver contents into this new directory unzip CventJDBCDriver.zip
  3. Open the Cvent directory and navigate to the lib folder ls cd lib/
  4. Copy the contents of the lib folder of 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 * ../../confluent-7.5.0/share/confluent-hub-components/confluentinc-kafka-connect-jdbc/lib/ cd ../../confluent-7.5.0/share/confluent-hub-components/confluentinc-kafka-connect-jdbc/lib/
  5. 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
  6. Enter the product key or "TRIAL" (In the scenarios of license expiry, please contact our CData Support team)
  7. 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.

    Start the Confluent local services
  8. 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 Cvent JDBC Driver. 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:

      1. Sign into Cvent and navigate to App Switcher (the blue button in the upper right corner of the page) >> Admin.
      2. In the Admin menu, navigate to Integrations >> REST API.
      3. A new tab launches for Developer Management. Click on Manage API Access in the new tab.
      4. 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:readevent/attendees:writeevent/contacts:read
          event/contacts:writeevent/custom-fields:readevent/custom-fields:write
          event/events:readevent/events:writeevent/sessions:delete
          event/sessions:readevent/sessions:writeevent/speakers:delete
          event/speakers:readevent/speakers:writebudget/budget-items:read
          budget/budget-items:writeexhibitor/exhibitors:readexhibitor/exhibitors:write
          survey/surveys:readsurvey/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.
      Using the built-in connection string designer to generate a JDBC URL (Salesforce is shown.)

    • 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.

  9. Run ksqlDB and list the topics. Use the commands: ksql list topics; List the Kafka Topics (BigCommerce is shown)
  10. 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.

Connect with Confluent Control Center

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.

Ready to get started?

Download a free trial of the Cvent Driver to get started:

 Download Now

Learn more:

Cvent Icon Cvent JDBC Driver

Rapidly create and deploy powerful Java applications that integrate with Cvent.