Tinybird
This page describes how to integrate WarpStream with Tinybird, ingest data into Tinybird from WarpStream, and then create an API endpoint for your applications to access the result set.
A video walkthrough can be found below:
Prerequisites
WarpStream account - get access to WarpStream by registering here.
Tinybird account - get access to Tinybird by registering here.
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 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:
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:
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.
![](https://docs.warpstream.com/~gitbook/image?url=https%3A%2F%2F77315434-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjB7FxO8ty4EXO4HsQP4E%252Fuploads%252F3x3US21DS85qNXogyIEu%252Ftb1.jpg%3Falt%3Dmedia%26token%3D423d514d-8b7c-4eb7-a89f-a2fd1d0acff6&width=768&dpr=4&quality=100&sign=7aa77137&sv=1)
![](https://docs.warpstream.com/~gitbook/image?url=https%3A%2F%2F77315434-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjB7FxO8ty4EXO4HsQP4E%252Fuploads%252FGM445SLlhkPoVmHdoiLL%252Ftb2.jpg%3Falt%3Dmedia%26token%3D8bb8c60c-21ed-4815-9176-efbb0e747de9&width=768&dpr=4&quality=100&sign=ddf62253&sv=1)
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:
![](https://docs.warpstream.com/~gitbook/image?url=https%3A%2F%2F77315434-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjB7FxO8ty4EXO4HsQP4E%252Fuploads%252Fw7eH1fRLtseUAzJTYHHh%252Ftb4.jpg%3Falt%3Dmedia%26token%3D7a502b88-f023-44ea-87b8-542859fb8fce&width=768&dpr=4&quality=100&sign=9832261c&sv=1)
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."
![](https://docs.warpstream.com/~gitbook/image?url=https%3A%2F%2F77315434-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjB7FxO8ty4EXO4HsQP4E%252Fuploads%252FyGrsCTINNo2eSEdbruEH%252Ftb6.jpg%3Falt%3Dmedia%26token%3D5cc3bc2c-fa5f-44f9-a9ce-2e4b997b9de7&width=768&dpr=4&quality=100&sign=c6c6b7bc&sv=1)
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.
![](https://docs.warpstream.com/~gitbook/image?url=https%3A%2F%2F77315434-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjB7FxO8ty4EXO4HsQP4E%252Fuploads%252F1jiVSJtGihPFm8nr9cYS%252Ftb7.jpg%3Falt%3Dmedia%26token%3Da5f30554-3670-4220-8f0d-84cc8119923b&width=768&dpr=4&quality=100&sign=92fb41ee&sv=1)
Taking the HTTP option and copying it into a browser yields the following result:
![](https://docs.warpstream.com/~gitbook/image?url=https%3A%2F%2F77315434-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjB7FxO8ty4EXO4HsQP4E%252Fuploads%252F1jiVSJtGihPFm8nr9cYS%252Ftb7.jpg%3Falt%3Dmedia%26token%3Da5f30554-3670-4220-8f0d-84cc8119923b&width=768&dpr=4&quality=100&sign=92fb41ee&sv=1)
![](https://docs.warpstream.com/~gitbook/image?url=https%3A%2F%2F77315434-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjB7FxO8ty4EXO4HsQP4E%252Fuploads%252FGKsXaAiAmGzPxhfM2oDY%252Ftb8.jpg%3Falt%3Dmedia%26token%3D336637af-68b6-4a13-89ff-682ee7fb6cf5&width=768&dpr=4&quality=100&sign=c67790af&sv=1)
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, or review the Tinybird Docs to learn more about what is possible with WarpStream and Tinybird!
Last updated