Skip to main content
The JDBC Lookup query pipeline stage is used to call out to a database as part of a pipeline stage, to inject results into either the context/request or the pipeline document. For example, if you needed to look up a user from a DB and add their profile information onto a request for downstream use in a pipeline, the JDBC Lookup Stage would facilitate this.
You must first Upload a JDBC Driver to Lucidworks Search.
The JDBC connector fetches documents from a relational database via SQL queries. Under the hood, this connector implements the Solr DataImportHandler (DIH) plugin.Lucidworks Search stores JDBC drivers in the blob store. You can upload a driver using the Lucidworks Search UI or the Blob Store API. Learn more about the JDBC V2 connector.

How to upload a JDBC driver using the Fusion UI

  1. In the Lucidworks Search UI, navigate to System > Blobs.
  2. Click Add.
  3. Select JDBC Driver.
    The “New ‘JDBC Driver’ Upload” panel appears.
    Uploading a connector
  4. Click Choose File and select the .jar file from your file system. Uploading connector
  5. Click Upload.
    The new driver’s blob manifest appears.
    Uploaded connector
From this screen you can also delete or replace the driver.

How to install a JDBC driver using the API

  1. Upload the JAR file to Lucidworks Search’s blob store using the /blobs/{id} endpoint. Specify an arbitrary blob ID, and a resourceType value of plugin:connector, as in this example:
    Success response:
    Lucidworks Search automatically publishes the event to the cluster, and the listeners perform the driver installation process on each node.
    If the blob ID is identical to an existing one, the old driver will be uninstalled and the new driver will installed in its place. To get the list of existing blob IDs, run: curl -u USERNAME:PASSWORD https://FUSION_HOST:FUSION_PORT/api/blobs
  2. To verify the uploaded driver, run:
    Where the BLOB_ID is the name specified during upload, such as “mydriver” above. A success response looks like this:
This stage supports asynchronous processing.

Example

An example of setup for a JDBC Lookup query pipeline stage. Upload stage config via POST to Lucidworks Search REST API endpoint api/query-stages/instances
Replace EXAMPLE_COMPANY with the name provided by your Lucidworks representative.
Response

Configuration

When entering configuration values in the UI, use unescaped characters, such as \t for the tab character. When entering configuration values in the API, use escaped characters, such as \\t for the tab character.