Important

The SingleStore 9.0 release candidate (RC) gives you the opportunity to preview, evaluate, and provide feedback on new and upcoming features prior to their general availability. In the interim, SingleStore 8.9 is recommended for production workloads, which can later be upgraded to SingleStore 9.0.

Connect with Apache NiFi

Apache NiFi is a data integration and automation platform designed to ingest, move, transform, and manage data across various systems in real time. You can connect to SingleStore from Apache NiFi using the SingleStore JDBC driver.

Refer to Apache NiFi documentation for more information.

Prerequisites

  1. Download and install Apache NiFi.

  2. Install Java 21+.

  3. Download the SingleStore JDBC driver .jar file.

  4. Start Apache NiFi. Run the following command from the NiFi installation directory.

    ./bin/nifi.sh start
  5. Copy the username and password from the generated log. Use these credentials to log in to NiFi Flow. For example,

    tail -n 100 <NiFi_installation_directory>/logs/nifi-app.log | grep Generated
    Generated Username [eea280ec-6000-4000-a000-9aaf521ef5cf]
    Generated Password [He5Gd9ZHVgkA0JQR9d9uNc2A5WAHROI4]

Configure the Connection to SingleStore

To configure the connection to SingleStore in NiFi Flow, perform the following:

  1. Open NiFi Flow, go to https://localhost:8443/nifi.

  2. Log in to NiFi Flow using the generated username and password.

  3. On the Nifi Flow canvas, open the options menu (right-click) and select Controller Services.

  4. Select the + icon.

  5. On the Add Controller Service dialog, from the list of controllers, select DBCPConnectionPool > Add.

  6. On the Controller Services page. Select the three dots for the controller added in the previous step, and then select Edit.

  7. In the Edit Controller Service dialog,

    1. On the Settings tab, enter SingleStore in the Name field.

    2. On the Properties tab, enter or select the following:

      1. Database Connection URL: Specify the connection string for the SingleStore deployment in the following format:

        jdbc:singlestore://<endpoint>:<port>/<database>

      2. Database Driver Class Name: Specify com.singlestore.jdbc.Driver.

      3. Database Driver Location: Specify the path to the SingleStore JDBC driver .jar file downloaded earlier.

      4. Database User: Specify the username of the SingleStore database user with which to connect.

      5. Password: Specify the password for the SingleStore database user.

      6. Specify other connection configuration properties as applicable.

      7. Under Verification, select ✔ > Verify to verify the connection configuration.

    3. After the connection configuration is verified, a message similar to the following is displayed:

      Perform Validation
      Component Validation passed
      Configure Data Source
      Successfully configured data source
      Establish Connection
      Successfully established Database Connection
    4. Select Apply. The SingleStore controller service is now configured.

  8. Enable the SingleStore controller service. Select the three dots for the controller, and then select Enable from the list.

  9. Close the Enable Controller Service dialog once the SingleStore controller service is enabled.

The connection to the SingleStore deployment is now configured. Specify the SingleStore controller service in processor configuration to connect to your SingleStore database.

Example

The following example connects to a SingleStore deployment, runs a SQL query, and then stores the output in a file.

  1. On the NiFi Flow canvas, add the ExecuteSQL processor by dragging the processor to the canvas.

  2. Configure the ExecuteSQL processor. Open the options menu for the processor (right-click) and then select Configure.

  3. On the Edit Processor dialog, enter or select the following:

    1. On the Settings tab, enter a name for the processor. For example, Query table.

    2. On the Properties tab, select Database Connection Pooling Service and then select SingleStore (the configured controller service) from the list.

    3. In the SQL Query field, enter a SQL query to run.

    4. Specify other connection configuration properties as applicable.

    5. Select Apply.

  4. On the NiFi Flow canvas, add the ConvertRecord processor.

  5. Configure the ConvertRecord processor. Open the options menu for the processor (right-click) and then select Configure.

  6. On the Edit Processor dialog, enter or select the following:

    • Record Reader: Select the three dots and then select Create new service > AvroReader. This example uses the AvroReader service.

    • Record Writer: Select the three dots and then select Create new service > JSONRecordSetWriter. This example uses the JSONRecordSetWriter service.

  7. On the NiFi Flow canvas, add the PutFile processor.

  8. Configure the PutFile processor. Open the options menu for the processor (right-click) and then select Configure.

  9. In the Edit Processor dialog, enter or select the following:

    1. On the Properties tab, enter the path to the directory where the output file is stored in the Directory field.

    2. On the Relationships tab, select terminate for success and failure.

    3. Select Apply.

  10. Configure the relationships between the ExecuteSQL, ConvertRecord, and PutFile processors.

  11. (If required) Enable all the controller services. Open the options menu for the canvas (right-click), and then select Enable All Controller Services.

  12. Open the options menu for the canvas and select Start.

  13. The output is written to a file in the specified directory. For example,

    Note

    The output is formatted for readability.

    cat 0b570ff9-9000-4000-9000-9eff3d4dde09
    [ {
        "id": 2,
        "created": "2025-06-05 11:58:23.978207",
        "payload": "{\"eventId\":202,\"tags\":[\"music\",\"concert\"]}"
      },
      {
        "id": 3,
        "created": "2025-06-05 11:58:23.978207",
        "payload": "{\"eventId\":101,\"tags\":[\"sports\",\"indoor\"]}"
      },
      {
        "id": 1,
        "created": "2025-06-05 11:58:23.978207",
        "payload": "{\"eventId\":101,\"tags\":[\"sports\",\"outdoor\",\"fun\"]}"
      }]

Last modified: August 25, 2025

Was this article helpful?

Verification instructions

Note: You must install cosign to verify the authenticity of the SingleStore file.

Use the following steps to verify the authenticity of singlestoredb-server, singlestoredb-toolbox, singlestoredb-studio, and singlestore-client SingleStore files that have been downloaded.

You may perform the following steps on any computer that can run cosign, such as the main deployment host of the cluster.

  1. (Optional) Run the following command to view the associated signature files.

    curl undefined
  2. Download the signature file from the SingleStore release server.

    • Option 1: Click the Download Signature button next to the SingleStore file.

    • Option 2: Copy and paste the following URL into the address bar of your browser and save the signature file.

    • Option 3: Run the following command to download the signature file.

      curl -O undefined
  3. After the signature file has been downloaded, run the following command to verify the authenticity of the SingleStore file.

    echo -n undefined |
    cosign verify-blob --certificate-oidc-issuer https://oidc.eks.us-east-1.amazonaws.com/id/CCDCDBA1379A5596AB5B2E46DCA385BC \
    --certificate-identity https://kubernetes.io/namespaces/freya-production/serviceaccounts/job-worker \
    --bundle undefined \
    --new-bundle-format -
    Verified OK