# Tinybird

A video walkthrough can be found below:

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

## Prerequisites

1. WarpStream account - get access to WarpStream by registering [here](https://console.warpstream.com/signup).
2. Tinybird account - get access to Tinybird by registering [here](https://auth.tinybird.co/).
3. Serverless 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 ](/warpstream/kafka/manage-security/sasl-authentication.md#creating-credentials)from the console.

Store these values for easy reference; they will be needed in Tinybird. If you are going to produce records to your topic from the command line, then export them 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 if you don't already have an active topic to work with:

{% code overflow="wrap" %}

```bash
warpstream kcmd -bootstrap-host $BOOTSTRAP_HOST -tls -username $SASL_USERNAME -password $SASL_PASSWORD -type produce -topic decodable_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 Tinybird to WarpStream

In the Tinybird Web Console, next to "**DATA PROJECT**," click "**+**" and select "**Data Source**," select "**Kafka**," and file in the connection information.

<figure><img src="/files/nZ7ObcvFsdZhmJjgLWix" alt=""><figcaption><p>Tinybird Connection Panel</p></figcaption></figure>

<figure><img src="/files/Y1yC3RfTtdpUhQbXFlPg" alt=""><figcaption><p>Tinybird Kafka Connection Details</p></figcaption></figure>

Walk through the next steps to select your Topic and set your Configuration. Name the data source, and then click "**Create Data Source**," which will present a data preview and graph of ingested data, similar to the following:

<figure><img src="/files/S50XTO5XqahHoWjrGASS" alt=""><figcaption></figcaption></figure>

## Step 4: Configure your Tinybird pipeline

Once again, next to "**DATA PROJECT**," click "**+**" and select "**Pipe**." Here you will create your SQL code to power your Tinybird API Endpoint. Tinybird will validate your code and provide a subset of the qualified dataset. In this example, we are looking for any "**action**" that does not have a status of "**ACCEPT,**" we've named this "**rejects**." Once satisfied with the results, click "**Create API Endpoint**."

<figure><img src="/files/TjGyXFYSUFxsvhqY4wdZ" alt=""><figcaption></figcaption></figure>

## Step 5: Deploy your Tinybird endpoint

Tinybird will present various code snippets to enable you to deploy your endpoint using the pipeline you just created.

<figure><img src="/files/UMgIMdOiPaBbj0K77tW1" alt=""><figcaption><p>TinyBird API deployment options</p></figcaption></figure>

Taking the HTTP option and copying it into a browser yields the following result:

<figure><img src="/files/UMgIMdOiPaBbj0K77tW1" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/DiNssr45TgS5z2rbShpI" alt=""><figcaption></figcaption></figure>

## Next Steps

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

Next, check out the WarpStream docs for configuring the [WarpStream Agent](/warpstream/agent-setup/deploy.md), or review the [Tinybird Docs](https://www.tinybird.co/docs) to learn more about what is possible with WarpStream and Tinybird!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.warpstream.com/warpstream/reference/integrations/tinybird.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
