CCDAK · Question #119
Which KSQL queries write to Kafka?
The correct answer is C. CREATE STREAM WITH <topic> and CREATE TABLE WITH <topic> D. CREATE STREAM AS SELECT and CREATE TABLE AS SELECT. SHOW STREAMS and EXPLAIN <query> statements run against the KSQL server that the KSQL client is connected to. They don't communicate directly with Kafka. CREATE STREAM WITH <topic> and CREATE TABLE WITH <topic> write metadata to the KSQL command topic. Persistent queries based…
Question
Which KSQL queries write to Kafka?
Options
- ACOUNT and JOIN
- BSHOW STREAMS and EXPLAIN <query> statements
- CCREATE STREAM WITH <topic> and CREATE TABLE WITH <topic>
- DCREATE STREAM AS SELECT and CREATE TABLE AS SELECT
How the community answered
(52 responses)- A8% (4)
- B21% (11)
- C71% (37)
Explanation
SHOW STREAMS and EXPLAIN <query> statements run against the KSQL server that the KSQL client is connected to. They don't communicate directly with Kafka. CREATE STREAM WITH <topic> and CREATE TABLE WITH <topic> write metadata to the KSQL command topic. Persistent queries based on CREATE STREAM AS SELECT and CREATE TABLE AS SELECT read and write to Kafka topics. Non- persistent queries based on SELECT that are stateless only read from Kafka topics, for example SELECT ,? FROM foo WHERE ,?. Non-persistent queries that are stateful read and write to Kafka, for example, COUNT and JOIN. The data in Kafka is deleted automatically when you terminate the query with CTRL-C.
Topics
Community Discussion
No community discussion yet for this question.