This tutorial shows how to integrate Upstash Kafka with Materialize
materialize_input
, since we are going to stream from this topic to Materialize
database. Name of the second topic can be materialize_output
. This one is
going to receive stream from Materialize.
wire-compatible
with PostgreSQL, that’s why it can be used with
most of the SQL clients.
Sign up and complete activation of your
Materialize account first.
Once you completed your activation, you can sign in and enable the region to run
Materialize database. It can provide better performance if you enable the same
region with location of your Upstash Kafka cluster.
Region setup takes a few minutes. During that time, create a new app password
from Connect
tab for your project. This step will generate a password and
display it just once. You should copy that password to somewhere safe before it
disappears.
To interact with your Materialize database, you need to download one of the
PostgreSQL installers mentioned
here.
After installing a PostgreSQL on your machine, open SQL shell, run the command
appeared on Connect tab to connect SQL Shell to Materialize database. You will
need to enter the app password to log in.
Now you are connected to your Materialize!
<upstash-username>
and <upstash-password>
with the username and password you
see on your Upstash Kafka cluster:
CREATE SECRET
command stores a sensitive value with the name assigned to it as
identifier. Once you define name and corresponding value with this command, you
will then be able to use the sensitive value by calling its name.
As the next step, we need to create a connection between Materialize and Upstash
Kafka by running following command from the psql terminal:
<connection-name>
is the going to be used as the name of the connection. You
can name it as you wish.
<upstash-endpoint>
is the endpoint of your Kafka. You can copy it from your
Upstash console.
Your connection is now established between Upstash Kafka and Materialize!
materialize_input
topic in your Kafka cluster.
Produce a message in this topic.