VOOZH about

URL: https://www.cdata.com/kb/tech/eloquareporting-jdbc-mendix.rst

⇱ Build Apps with Live Oracle Eloqua Reporting Data Using the Low-Code Development Platform of Mendix


Build Apps with Live Oracle Eloqua Reporting Data Using the Low-Code Development Platform of Mendix

πŸ‘ Dibyendu Datta
Dibyendu Datta
Lead Technology Evangelist
Connect Oracle Eloqua Reporting data with Mendix to build apps using the CData JDBC Driver for Oracle Eloqua Reporting.

Mendix, developed by Siemens, is a low-code platform used to rapidly develop, test, and deploy web and mobile applications, facilitating digital transformation and enhancing business agility. When paired with the CData JDBC Driver for Oracle Eloqua Reporting, you can use your Oracle Eloqua Reporting data to create various applications using Mendix Studio Pro.

With built-in optimized data processing, the CData JDBC driver offers unmatched performance for interacting with live Oracle Eloqua Reporting data. When you issue complex SQL queries to Oracle Eloqua Reporting, the driver pushes supported SQL operations, like filters and aggregations, directly to Oracle Eloqua Reporting 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 Oracle Eloqua Reporting data using native data types.

This article shows how you can easily create an application that utilizes Oracle Eloqua Reporting data in Mendix by combining the JDBC interface provided by Mendix with the CData JDBC Driver for Oracle Eloqua Reporting.

Preparing the Mendix environment

In this section, we will explore how to develop an app using Mendix Studio Pro, as previously introduced, with Oracle Eloqua Reporting data. Be sure to install Mendix Studio Pro beforehand.

Install the CData JDBC Driver for Oracle Eloqua Reporting

First, install the CData JDBC Driver for Oracle Eloqua Reporting on the same machine as Mendix. The JDBC Driver will be installed in the following path:

C:\Program Files\CData\CData JDBC Driver for Oracle Eloqua Reporting 20xx\lib\cdata.jdbc.oracleeloquareporting.jar

Create an application

Now let's start creating the app. First, let's make an app that has the Database Connector available.

  1. Launch Mendix Studio Pro and click 'Create New App.' πŸ‘ Create a new app
  2. Select the 'Blank Web App' option. πŸ‘ Select the Blank Web App option
  3. Click 'Use this starting point' to proceed. πŸ‘ Use this starting point
  4. Create an app with a name of your choice. Also, note down the "Disk location" information, for future reference. πŸ‘ Name the app and note the disk location information
  5. You have now created a brand-new app. πŸ‘ The app is now created

Add the Database Connector to your application

Next, add the Database Connector module to the app you just created.

  1. On the top right, click on the Marketplace button.
  2. Search for Database Connector in the Marketplace search section and select it. πŸ‘ Search for the Database Connector from the marketplace
  3. Click on Download to download the latest Database Connector. πŸ‘ Download the latest Database Connector
  4. In the Import Module window, select the Action as Add as a new module. πŸ‘ Add a new module
    πŸ‘ Module is successfully imported
  5. If the Database Connector appears on the app screen, you are good to move on to the next steps. πŸ‘ Database connector is ready to be used

Adding the JDBC Driver to Mendix Studio Pro

To use the CData JDBC driver with this Database Connector, you must add the JDBC Driver JAR file to your project.

  1. In the Mendix project folder you noted earlier, there is a folder named 'userlib.' Place the two files, 'cdata.jdbc.oracleeloquareporting.jar' and 'cdata.jdbc.oracleeloquareporting.lic,' into that folder. πŸ‘ Place the JAR and LIC files in the userlib folder of Mendix
  2. You can now use the CData JDBC Driver with the Database Connector.

Create a Data Model

Now, let's create an app. We first need to define a data model to load data from the Database Connector and display it on the list screen. Let's create the data model before loading the data.

  1. Add an Entity to the 'Domain model' of MyFirstModule. πŸ‘ Add an entity
  2. Enter the entity name and field definitions. πŸ‘ Add the entity name and field definitions
  3. You can easily configure the data by checking the table definition information through the CData JDBC driver using a tool such as DBeaver. πŸ‘ Check and configure the data using any database administration tool
  4. Define the entities. πŸ‘ Define the entities

Create a constant for the JDBC URL

Next, create a JDBC URL constant to use with the Database Connector.

  1. Add 'Constant' to MyFirstModule. πŸ‘ Add a constant
  2. Add a name to the Constant in the Add Constant window. πŸ‘ Add a name to the constant
  3. Generate a JDBC URL for connecting to Oracle Eloqua Reporting, beginning with jdbc:oracleeloquareporting: followed by a series of semicolon-separated connection string properties.

    Oracle Eloqua Reporting supports the following authentication methods:

    • Basic authentication (User and Password)
    • OAuth 2.0 code grant flow
    • OAuth 2.0 password grant flow

    Basic Authentication (User and Password)

    To perform authentication with a user and password, specify these properties:

    • AuthScheme: Basic.
    • Company: The company name associated with your Oracle Eloqua Reporting account.
    • User: Your login account name.
    • Password: Your login password.

    OAuth Authentication (Code Grant Flow)

    To authenticate with the OAuth code grant flow, you must set AuthScheme to OAuth and create a custom OAuth application. For information about how to create a custom OAuth application, see the Help documentation.

    Then set the following properties:

    • InitiateOAuth: GETANDREFRESH. Used to automatically get and refresh the OAuthAccessToken.
    • OAuthClientId: The client Id assigned when you registered your application.
    • OAuthClientSecret: The client secret that was assigned when you registered your application.
    • CallbackURL: The redirect URI that was defined when you registered your application.

    When you connect, the driver opens Oracle Eloqua Reporting's OAuth endpoint in your default browser. Log in and grant permissions to the application. When the access token expires, the driver refreshes it automatically.

    OAuth Authentication (Password Grant Flow)

    With the OAuth password grant flow, you can use your OAuth application's credentials alongside your user credentials to authenticate without the need to grant permission manually via a browser prompt. You must create an OAuth app (see the Help documentation) to use this authentication method.

    Set the following properties:

    • AuthScheme: OAuthPassword
    • Company: The company's unique identifier.
    • User: Your login account name.
    • Password: Your login password.
    • OAuthClientId: The client Id assigned when you registered your custom OAuth application.
    • OAuthClientSecret: The client secret assigned when you registered your custom OAuth application.

    Built-in Connection String Designer

    For assistance in constructing the JDBC URL, use the connection string designer built into the Oracle Eloqua Reporting JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.

    java -jar cdata.jdbc.oracleeloquareporting.jar
    

    Fill in the connection properties and copy the connection string to the clipboard.

    πŸ‘ Using the built-in connection string designer to generate a JDBC URL (Salesforce is shown.)

    A typical JDBC URL is below:

    jdbc:oracleeloquareporting:AuthScheme=Basic;User=user;Password=password;Company=MyCompany;
    
  4. Specify the connection string copied from the previous step in the Default value section and click on OK. πŸ‘ Provide the connection string

Create a microflow to retrieve Oracle Eloqua Reporting data

Let's create a microflow that retrieves data from the Database Connector based on the entity we created.

  1. Click 'Add microflow' from MyFirstModule. πŸ‘ Click on Add microflow
  2. Create a microflow with any name. πŸ‘ Create a microflow
  3. First, create an object for the entity you defined earlier. Then, add the 'Create Object' action to the microflow. πŸ‘ Create an object
  4. Click on the 'Select' button for Entity in the Create Object window. πŸ‘ Click on Select in create object window
  5. Select a previously defined Entity. πŸ‘ Select the defined entity
  6. Enter an arbitrary Object name and click OK. πŸ‘ Enter an object name
  7. Next, add an Execute Query action to the microflow to retrieve data from the Database Connector. πŸ‘ Add an execute query action
  8. Define each input in the Execute Query window. πŸ‘ Define each inputs for execute query
  9. In "jdbc url", specify the constant you defined beforehand. πŸ‘ Specify the constant defined before
  10. In SQL, write a query to retrieve data from Oracle Eloqua Reporting. πŸ‘ Write a query to retrieve the data
  11. You don't need a Username or Password this time, so set them to 'empty' and assign the object created in the previous flow as the Result object. Then, simply specify any name you prefer for the List in the List Name section. πŸ‘ Add any name to the list
  12. Finally, define the output of the microflow. πŸ‘ Define the output of the microflow
  13. Double-click the End Event to open it, select 'List' from the Type dropdown, and link it to the Entity you defined earlier. Then, set the output result of Execute Query as the Return value. πŸ‘ Link list to the entity
  14. This completes the microflow that retrieves data from Oracle Eloqua Reporting. πŸ‘ Microflow creation is complete

Create a list screen and link it to a microflow

Finally, let's create a screen that displays the results obtained from the microflow.

  1. Double-click 'Home_web' inside the Toolbox menu to open it. πŸ‘ Open Home_web from toolbox menu
  2. Drag and drop a Data grid template from the Data containers section into the list screen. πŸ‘ Drag and drop data grid template into the list screen
  3. Once you have placed the Data grid, double-click on it to display the Edit Data Grid settings screen. πŸ‘ Open edit data grid to configure it
  4. Navigate to the Data source tab and link the data source type with the Microflow.
  5. Select the microflow you just created. πŸ‘ Select the microflow
  6. Now click OK. πŸ‘ Approve the microflow configuration
  7. When you click OK, you'll be prompted to auto-detect columns. Simply click 'Yes' to proceed. πŸ‘ Click Yes for auto-detect columns
  8. Next, you'll be prompted to generate controllers for various Data grids. Since we won't be configuring the logic for each one this time, click 'No.' πŸ‘ Click No to controllers for data grids
  9. This will create a simple data grid screen as shown below. πŸ‘ Data grid screen is now created and ready to be used

Try it out

Now let's check if it works properly.

  1. Click the 'Publish' button to prepare the app you created. Once that's done, click 'View App' to open the app. πŸ‘ Publish the app created
  2. If you see a list of Oracle Eloqua Reporting data like the one below, you're all set! You've successfully created a Oracle Eloqua Reporting-linked app with low code, without needing to worry about Oracle Eloqua Reporting's API. πŸ‘ See the list of Oracle Eloqua Reporting data on the Mendix app screen

Get Started Today

Download a free 30-day trial of the CData JDBC Driver for Oracle Eloqua Reporting with Mendix, and effortlessly create an app that connects to Oracle Eloqua Reporting data.

Reach out to our Support Team if you have any questions.

Ready to get started?

Download a free trial of the Oracle Eloqua Reporting Driver to get started:

 Download Now

Learn more:

πŸ‘ Oracle Eloqua Reporting Icon
Oracle Eloqua Reporting JDBC Driver

Rapidly create and deploy powerful Java applications that integrate with Oracle Eloqua Reporting.