> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MuleSoft

> This page outlines the steps to install and configure the Connect AI connector for MuleSoft. After installation, MuleSoft can pull data from sources that you have connected to your Connect AI account.

## Prerequisites

Before you can configure and use MuleSoft with Connect AI, you must first connect a data source to your Connect AI account. See [Sources](/en/Sources) for more information.

You must also generate a Personal Access Token (PAT) on the [Settings](/en/Settings#personal-access-tokens) page. Copy this down, as it acts as your password during authentication.

## Connect to Connect AI

To establish a connection from MuleSoft to Connect AI through the JDBC driver, follow these steps.

<Steps>
  <Step>
    Download and install the Connect AI JDBC driver.

    a. Open the **Integrations** page of Connect AI.

    b. In the **Dev Tools** section, click **JDBC**.

    c. Download and run the setup file.

    d. When the installation is complete, the JAR file can be found in the installation directory.
  </Step>

  <Step>
    Log in to MuleSoft Anypoint Studio or launch the desktop application.
  </Step>

  <Step>
    Create a new MuleSoft project.

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_create_project.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=8450d746e36b622bc5134d24e8a7ccee" alt="" width="1177" height="627" data-path="en/images/mulesoft_client_create_project.png" />
    </Frame>

    The new project appears in a project folder.

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_create_project_2.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=18df094aacd410adccf44cfb3083d88c" alt="" width="1175" height="627" data-path="en/images/mulesoft_client_create_project_2.png" />
    </Frame>
  </Step>

  <Step>
    In the **Mule Palette** on the right, drag a HTTP Listener to the **Message Flow** area.

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_http_listener.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=668b44ed6883b9d536d01a8067cf3be7" alt="" width="1171" height="596" data-path="en/images/mulesoft_client_http_listener.png" />
    </Frame>
  </Step>

  <Step>
    Click the **HTTP Listener** to configure it.

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_http_listener_2.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=3fe42f133eb9e0160f69e5f6e3ec75d1" alt="" width="1204" height="529" data-path="en/images/mulesoft_client_http_listener_2.png" />
    </Frame>
  </Step>

  <Step>
    Click the **+** sign to the right of **Connector configuration**. The **HTTP Listener config** dialog appears.

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_http_listener_3.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=18148f46f30d1338dd192678ca29ba71" alt="" width="887" height="903" data-path="en/images/mulesoft_client_http_listener_3.png" />
    </Frame>
  </Step>

  <Step>
    Configure the HTTP Listener, providing a **Port** on which to query your data, and click **OK**.
  </Step>

  <Step>
    Provide a path on which to perform the actions. The HTTP Listener is now configured.

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_http_listener_4.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=e7a3ba602f2ae1f95f61c30efcf836c4" alt="" width="1177" height="382" data-path="en/images/mulesoft_client_http_listener_4.png" />
    </Frame>
  </Step>

  <Step>
    In the **Mule Palette** on the right, type `database` in the search bar.

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_database.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=d3c111a6fb0a9e791952f760cf3d07cd" alt="" width="588" height="612" data-path="en/images/mulesoft_client_database.png" />
    </Frame>
  </Step>

  <Step>
    Drag the database operation you want to perform to the **Message Flow** area. For this example, we choose **Select**.

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_select.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=31ea3dfcc8819f7573169e025e9d73c9" alt="" width="1162" height="643" data-path="en/images/mulesoft_client_select.png" />
    </Frame>
  </Step>

  <Step>
    Click the **Configure** button to configure the JDBC driver. Select **Use local file** from the drop-down list.
  </Step>

  <Step>
    Locate the Connect AI JAR file from the JDBC driver installation and click **OK**.

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_database_config.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=1cb9f49a064ef2886dd77f489edf7712" alt="" width="615" height="622" data-path="en/images/mulesoft_client_database_config.png" />
    </Frame>
  </Step>

  <Step>
    Provide the following information:

    * **URL**–the URL for the connection, for example: `jdbc:connect:Authscheme=Basic;user=username;password=password`.

    <Note>
      the password is the PAT created in the prerequisites.
    </Note>

    * **Driver class name**–`cdata.jdbc.connect.ConnectDriver`

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_database_config_2.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=4749f92ffb3f9957b7c526238d19a22e" alt="" width="615" height="622" data-path="en/images/mulesoft_client_database_config_2.png" />
    </Frame>
  </Step>

  <Step>
    Click **Test Connection**.
  </Step>

  <Step>
    If the connection is successful, provide the **SQL Query Text** in the editor. You can see the metadata of the table on the right side in the **Output** tab.

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_sql_query.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=3162e9425cc156c6bd2abc6bdd2e02ea" alt="" width="1266" height="489" data-path="en/images/mulesoft_client_sql_query.png" />
    </Frame>
  </Step>

  <Step>
    In the **Mule Palette**, drag **Transform Message** to the **Message Flow** area.

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_transform_message.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=1ea15cba75b4c72563c6a07e5fe1b5d0" alt="" width="312" height="245" data-path="en/images/mulesoft_client_transform_message.png" />
    </Frame>
  </Step>

  <Step>
    Click **Transform Message** to configure it. Change the **Output** as follows:

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_output_message.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=aaf2478c2773530d5b9aee904e4c23a6" alt="" width="573" height="205" data-path="en/images/mulesoft_client_output_message.png" />
    </Frame>
  </Step>

  <Step>
    Save your project and run it. In the console, MuleSoft starts initializing the dependencies.
  </Step>

  <Step>
    Once you see the message, `Message source 'listener' on flow your_project_name successfully started`, you can start querying your data at the endpoint you provided.

    <Frame>
      <img src="https://mintcdn.com/cdata/rskOtmB_oKRs4KNs/en/images/mulesoft_client_query_data.png?fit=max&auto=format&n=rskOtmB_oKRs4KNs&q=85&s=be5e28189e8b037cbe83532868037dd9" alt="" width="1247" height="650" data-path="en/images/mulesoft_client_query_data.png" />
    </Frame>
  </Step>
</Steps>
