ksqlDB in Confluent Control Center¶
Control Center provides the convenience of running streaming queries on one or more ksqlDB clusters within its graphical user interface. The ksqlDB feature is enabled by default in Control Center.
If RBAC is enabled, the ability to view and use ksqlDB in Control Center is determined by the assigned roles and associated privileges configured in both ksqlDB and Control Center.
For more information about ksqlDB, see ksqlDB.
Configure Control Center for ksqlDB applications¶
When you start a local Confluent Platform install using the confluent local services start command from the Confluent CLI, a default ksqlDB application named ksqlDB is created for you.
To configure Control Center to communicate with your own multiple ksqlDB
applications in a production environment, set the following options in the
confluent.controlcenter.ksql.<name of cluster>.url = <list of urls>
confluent.controlcenter.ksql.<name of cluster>.advertised.url = <list of urls>
Be sure to review Integrate ksqlDB with Confluent Control Center for more information on configurations for both ksqlDB and Control Center.
Links to comprehensive ksqlDB documentation are available throughout the Control Center ksqlDB web interface.
ksqlDB applications page¶
To access the ksqlDB applications page, click the cluster from the navigation bar and select ksqlDB from the cluster submenu.
Use the ksqlDB applications page to:
- View a summary of all ksqlDB applications connected to Control Center.
- Search for a ksqlDB application being managed by the Control Center instance.
- Browse topic messages.
- View the number of running queries, registered streams, and registered tables for each ksqlDB application.
- Navigate to the ksqlDB Editor, Streams, Tables, and Running Queries for each ksqlDB application. Click the ksqlDB application name link to navigate to the ksqlDB Editor and other pages.
To access the ksqlDB Editor page, click the ksqlDB application name in the ksqlDB applications page.
Use the ksqlDB Editor page to run SQL queries and browse messages.
After creating streams and tables, the resizeable streams and tables pane is
populated with the defined streams and tables for the application, beyond the
- Streams are indicated with a blue St expandable node:
- Tables are indicated with an orange Tb expandable node:
Click a node to view the schema for a stream or table.
A Search box enables searching for streams and tables.
Download selected messages¶
Run a query in the ksqlDB Editor to activate the message browser area. After the messages area is populated with messages, you can select messages for download, whether the query is running or stopped.
Select one or more contiguous or non-contiguous rows. The Download button becomes available and shows the number of selected messages.
Press the command key + click to select non-contiguous rows. Press shift + click on a beginning and ending row to select a contiguous range of messages.
Click the download button: . A file named
selected_data_<n>.jsonthat contains the selected messages in JSON format is downloaded into your downloads directory. The n represents the number of selected messages.
To access the Streams page, click the ksqlDB application name in the ksqlDB applications page and click the Streams tab.
Use the Streams page to:
- View a summary of streams for the ksqlDB application.
- Search for streams.
- Add a stream.
- View the Describe stream output (analogous to the DESCRIBE command in the ksqlDB CLI).
- Jump to the ksqlDB Editor page to query the stream.
- Drop a stream (analogous to the DROP STREAM command in the ksqlDB CLI).
Click a stream to view its information, like the stream name, associated Kafka topic, number of partitions and replicas, and the data format.
To access the Tables page, click the ksqlDB application name in the ksqlDB applications page and click the Tables tab.
Use the Tables page to:
- View a summary of tables for the ksqlDB application.
- Search for tables.
- Add a table.
- View the Describe table output (analogous to the DESCRIBE|developer-guide/ksqldb-reference/describe/ command in the ksqlDB CLI)
- Jump to the ksqlDB Editor page to query the table.
- Drop a table (analogous to the DROP TABLE|developer-guide/ksqldb-reference/drop-table/ command in the ksqlDB CLI).
Click Learn More to view the ksqlDB tutorials available in Kafka Tutorials.
Click a table to view its information, like the table name, associated Kafka topic, number of partitions and replicas, and the data format.
To access the Running Queries page, click the ksqlDB application name in the ksqlDB applications page and click the Running Queries tab.
Use the Running Queries page to:
- View the syntax and details of running queries.
- Search running queries.
- View the query execution plan by clicking Explain (analogous to the EXPLAIN command in the ksqlDB CLI).
- Terminate a running query.
Click Persistent Query Examples to view the ksqlDB examples available in Kafka Tutorials.
To access the Flow View page, click the ksqlDB cluster name in the ksqlDB applications page and click the Flow tab.
Use Flow View to:
- View the topology of your ksqlDB application.
- Inspect the details of streams, tables, and the ksqlDB statements that create them.
- View events as they flow through your application.
Click a node in the graph to see details about the topology of your ksqlDB application. For example, click on a stream to see its schema and the messages as they arrive in realtime.
Enable and disable the ksqlDB feature in Control Center¶
The ksqlDB feature is enabled by default. The feature can be disabled by setting
confluent.controlcenter.ksql.enable option in the Control Center properties
false. After disabling the feature, the ksqlDB submenu in the Cluster
navigation is no longer visible in the Control Center UI. You can disable the setting
if you are not using RBAC in Control Center or ksqlDB, and you do not want anyone
to access the ksqlDB feature.
If RBAC is enabled for Control Center, it takes precedence over Access Control settings.
To disable the ksqlDB feature in Control Center:
confluent.controlcenter.ksql.enableoption in your
... confluent.controlcenter.ksql.enable=false ...
Make the change in the appropriate Control Center properties files configured for your environments, including
control-center-production.properties. The properties files are located in
Restart Control Center and pass in the properties file for the configuration to take effect.
Local (dev) environment:
Do not use confluent local for production use.
confluent local services control-center stop confluent local services control-center start --config="../etc/confluent-control-center/control-center.properties"
./bin/control-center-stop ./bin/control-center-start ../etc/confluent-control-center/control-center.properties
To enable the feature again, set the option back to
true and restart
Control Center with the updated properties file.