Create a Flink table with a CREATE TABLE statement when you want to use
any connector that Flink supports. Cloudera SQL Stream Builder (SSB) provides templates
that give you the statement for common connectors.
The SSB templates include:
Kafka and Upsert Kafka, which read and write Kafka topics.
JDBC, with the PostgreSQL driver that the engine instance includes.
Filesystem, which reads and writes files. The formats are Avro, JSON, CSV, ORC, and
Parquet.
CDC, which reads change events from MySQL, PostgreSQL, Oracle, SQL Server, and
Db2.
Iceberg, which reads and writes Iceberg tables.
Datagen, which generates random data.
Faker, which generates realistic data.
Blackhole, which discards the rows that it receives. Use it for testing.
For the full list of connector types, see Supported connectors. For more
information about the templates, see Using connector templates.
In the Streaming SQL Console, click Projects in the left
navigation pane, and click the name of your project.
The project opens, with the Explorer panel on the left.
To open the Streaming SQL Console, see Accessing Cloudera SQL Stream Builder.
In the Explorer, open the menu of Jobs,
and click New Job.
The Create New Job window opens.
Enter a Job Name, or click Generate Job
Name.
Click Create.
The job opens in a new tab, with an empty SQL editor.
In the toolbar of the SQL editor, open the Templates menu, and
click the connector type, for example datagen.
The CREATE TABLE statement of the template is displayed in the SQL
editor.
Edit the statement. Change the table name, the columns, and the WITH
options.
Click the Execute job icon.
The table is created, and you can use it in the queries of the job.
For the DDL syntax, see Flink DDL.
For the options of each connector, see the Apache Flink documentation.