Submitting a SQL job
Sign in to SSB and run a new job to confirm launching Flink jobs.
- What is SQL Stream Builder (SSB)?
- The SSB is a comprehensive interactive user interface for creating stateful
stream processing jobs using SQL. By using SQL, you can simply and easily
declare expressions that filter, aggregate, route, and otherwise mutate streams
of data. SSB is a job management interface that you can use to compose and run
SQL on streams, as well as to create durable data APIs for the results.
For more information on SSB, see SQL Stream Builder Overview.
To access the User Interface (UI) of SSB, Streaming SQL Console, run the following command to set up the port-forwarding:
kubectl -n flink port-forward service/ssb-sse 18121:18121
This enables access to Streaming SQL Console at http://localhost:18121
(or
your machine’s IP address if it differs from localhost).
You can sign in to Streaming SQL Console using the default username and password (admin - admin), or you can register with a new account.
After logging in, you are redirected to the Projects homepage of Streaming SQL Console. To start a simple SQL job, open the ssb_default project. Click to create a new job with a randomly generated name or you can provide your own.
Copy and paste the following SQL query to the SQL Editor, and click Execute:
CREATE TABLE blackhole (col1 STRING) WITH ('connector'='print');
CREATE TABLE datagen (col1 STRING) WITH ('connector'='datagen');
INSERT INTO blackhole SELECT * FROM datagen;
This job generates random rows and writes the generated data to the TaskManager logs. You can use this example to verify that SSB can successfully launch a Flink job.