Rockset
This page describes how to integrate WarpStream with Rockset, ingest data into Rockset from WarpStream, and query the data in Rockset.
Prerequisites
WarpStream account - get access to WarpStream by registering here.
Rockset account - get access to Rockset by registering here.
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 then 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 as environment variables for easy reference:
Then, create a topic using the WarpStream CLI:
You should see the following output in your Terminal:
Created topic rockset_demo.
Step 2: Produce some records
Using the WarpStream CLI, produce several messages to your topic:
Note that the WarpStream CLI uses double commas (,,)
as a delimiter between JSON records.
Step 3: Set up a Rockset Integration with WarpStream
In the Rockset Console, navigate to Integrations > WarpStream.
Click "Start", and fill in the information for your WarpStream cluster.
Click "Save Integration."
Step 4: Create a Collection from your Integration
In the Rockset console, after creating your Integration, click "Create Collection from Integration".
Set the Kafka Topic name to rockset_demo
, and set Starting Offset to Earliest
. Select JSON
as the Data Format. In the Source Preview window, you should see the messages that you produced in Step 2.
Step 5: Filter out records with null values for user_id
In the Rockset Console, write a query in the Ingest Transformation Query Editor that filters out messages with null user_id
s.
Step 6: Save your Collection
In the Rockset Console, name your Collection and save it with the default settings.
Step 7: Produce more messages to your WarpStream topic
In your Terminal, produce several more messages:
Look closely! We sent six records to WarpStream, but two of them have null values for user_id
.
In the Rockset Console, look at the Summary tab of your Collection overview. You should notice that only four records made it into the Collection from this latest batch. Rockset filtered out the records with null values for user_id
!
Next steps
Congrats! Now you know how to integrate WarpStream with Rockset. Next, check out the WarpStream docs on how to configure the Agent for production, or review the Rockset docs to learn more about what's possible with WarpStream and Rockset.
Last updated