# Upsolver

A video walkthrough can be found below:

{% embed url="<https://youtu.be/uo0QVJeN3NU>" %}

## Prerequisites

1. WarpStream account - get access to WarpStream by registering [here](https://console.warpstream.com/signup).
2. Upsolver account - get access to Upsolver by registering [here](https://sqlake.upsolver.com/).
3. WarpStream cluster up and running.

## Step 1: Create a topic in your WarpStream cluster

Obtain the Bootstrap Broker from the WarpStream console by navigating to your cluster and clicking the Connect tab. If you don't have SASL credentials yet, you can also [create a set of credentials](https://docs.warpstream.com/warpstream/kafka/manage-security/sasl-authentication#creating-credentials) from the console.

Store these values for easy reference; they will be needed in Upsolver. If you are going to produce records to your topic from the command line, then export them as environment variables in a terminal window:

```bash
export BOOTSTRAP_HOST=<YOUR_BOOTSTRAP_BROKER> \
SASL_USERNAME=<YOUR_SASL_USERNAME> \
SASL_PASSWORD=<YOUR_SASL_PASSWORD>;
```

Then, create a topic in the WarpStream console if you don't already have one.

## Step 2: Produce some records

You can use the WarpStream CLI to produce messages to your topic:

{% code overflow="wrap" %}

```bash
warpstream kcmd -bootstrap-host $BOOTSTRAP_HOST -tls -username $SASL_USERNAME -password $SASL_PASSWORD -type produce -topic upsolver_demo --records '{"action": "click", "user_id": "user_0", "page_id": "home"},,{"action": "hover", "user_id": "user_0", "page_id": "home"},,{"action": "scroll", "user_id": "user_0", "page_id": "home"},,{"action": "click", "user_id": "user_1", "page_id": "home"},,{"action": "click", "user_id": "user_1", "page_id": "home"},,{"action": "click", "user_id": "user_2", "page_id": "home"}'
```

{% endcode %}

Note that the WarpStream CLI uses double commas (`,,)` as a delimiter between JSON records.

## Step 3: Connect Upsolver to WarpStream

In the Upsolver Web Console, under Jobs, click "**+ New Job**". Select "**Kafka**" as the source and an applicable target.

<figure><img src="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-f1a1e4f1b916dd6251ca6c99ff6c9ba3b5391977%2FScreenshot%202024-05-30%20130300.jpg?alt=media" alt=""><figcaption><p>Upsolver Job Dialog</p></figcaption></figure>

A standard connection will require you to configure a Kafka host, and Consumer Properties, which take the form of:

```
bootstrap.servers = HOST:PORT
security.protocol = SASL_SSL
sasl.jaas.config = org.apache.kafka.common.security.plain.PlainLoginModule   required username = "API_KEY"   password = "SECRET";
ssl.endpoint.identification.algorithm = https
sasl.mechanism = PLAIN
```

Using our credentials from Step 1, it will look like the following. Make sure to include the port 9092:

<figure><img src="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-a05366f8e941c5ffe4c1940d7d6892e6b0f8cb38%2FScreenshot%202024-05-30%20134949.jpg?alt=media" alt=""><figcaption><p>Upsolver Kafka configuration</p></figcaption></figure>

Name your connection and then click on "**Test Connection".** Once you have a successful connection, you'll be able to select from a list of available topics and get a preview of data as seen below:

<figure><img src="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-cc9bc41b2f0399ee2c142ae05b806cf318a89e74%2FScreenshot%202024-05-30%20141602.jpg?alt=media" alt=""><figcaption></figcaption></figure>

## Step 4: Configure your target in Upsolver

From this point, all your setup will be in Upsolver to configure your target and any transformations:

<figure><img src="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-45506509484c0ed52d634896f94bf330abc301db%2FScreenshot%202024-05-30%20143305.jpg?alt=media" alt=""><figcaption><p>Upsolver target configuration</p></figcaption></figure>

## Next Steps

Congratulations! You've set up a stream processing pipeline between WarpStream and Upsolver.

Next, check out the WarpStream docs for configuring the [WarpStream Agent](https://docs.warpstream.com/warpstream/agent-setup/deploy), or review the [Upsolver docs](https://docs.upsolver.com/content) to learn more about what is possible with WarpStream and Upsolver!
