Skip to content

Commit c99d2ab

Browse files
apurvamApurva Mehta
authored andcommitted
Update quickstart docs with new output for describe (#684)
1 parent 951bafa commit c99d2ab

File tree

1 file changed

+46
-36
lines changed

1 file changed

+46
-36
lines changed

docs/quickstart/README.md

Lines changed: 46 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,16 @@ Before proceeding, please check:
6868
6969
ksql> DESCRIBE pageviews_original;
7070
71-
Field | Type
72-
----------------------------
73-
ROWTIME | BIGINT
74-
ROWKEY | VARCHAR(STRING)
75-
VIEWTIME | BIGINT
76-
USERID | VARCHAR(STRING)
77-
PAGEID | VARCHAR(STRING)
78-
```
71+
Field | Type
72+
--------------------------------------
73+
ROWTIME | BIGINT (system)
74+
ROWKEY | VARCHAR(STRING) (system)
75+
VIEWTIME | BIGINT
76+
USERID | VARCHAR(STRING)
77+
PAGEID | VARCHAR(STRING)
78+
--------------------------------------
79+
For runtime statistics and query details run: DESCRIBE EXTENDED <Stream,Table>;
80+
```
7981

8082
2. Create a TABLE `users_original` from the Kafka topic `users`, specifying the `value_format` of `JSON`. Describe the new TABLE.
8183

@@ -84,14 +86,16 @@ Before proceeding, please check:
8486
8587
ksql> DESCRIBE users_original;
8688
87-
Field | Type
88-
--------------------------------
89-
ROWTIME | BIGINT
90-
ROWKEY | VARCHAR(STRING)
91-
REGISTERTIME | BIGINT
92-
GENDER | VARCHAR(STRING)
93-
REGIONID | VARCHAR(STRING)
89+
Field | Type
90+
------------------------------------------
91+
ROWTIME | BIGINT (system)
92+
ROWKEY | VARCHAR(STRING) (system)
93+
REGISTERTIME | BIGINT
94+
GENDER | VARCHAR(STRING)
95+
REGIONID | VARCHAR(STRING)
9496
USERID | VARCHAR(STRING)
97+
------------------------------------------
98+
For runtime statistics and query details run: DESCRIBE EXTENDED <Stream,Table>;
9599
```
96100

97101
3. Show all STREAMS and TABLES.
@@ -133,14 +137,17 @@ Before proceeding, please check:
133137
ksql> CREATE STREAM pageviews_female AS SELECT users_original.userid AS userid, pageid, regionid, gender FROM pageviews_original LEFT JOIN users_original ON pageviews_original.userid = users_original.userid WHERE gender = 'FEMALE';
134138
135139
ksql> DESCRIBE pageviews_female;
136-
Field | Type
137-
----------------------------
138-
ROWTIME | BIGINT
139-
ROWKEY | VARCHAR(STRING)
140-
USERID | VARCHAR(STRING)
141-
PAGEID | VARCHAR(STRING)
142-
REGIONID | VARCHAR(STRING)
143-
GENDER | VARCHAR(STRING)
140+
141+
Field | Type
142+
--------------------------------------
143+
ROWTIME | BIGINT (system)
144+
ROWKEY | VARCHAR(STRING) (system)
145+
USERID | VARCHAR(STRING) (key)
146+
PAGEID | VARCHAR(STRING)
147+
REGIONID | VARCHAR(STRING)
148+
GENDER | VARCHAR(STRING)
149+
--------------------------------------
150+
For runtime statistics and query details run: DESCRIBE EXTENDED <Stream,Table>;
144151
```
145152

146153
3. Use `SELECT` to view query results as they come in. To stop viewing the query results, press `<ctrl-c>`. This stops printing to the console but it does not terminate the actual query. The query continues to run in the underlying KSQL application.
@@ -167,14 +174,16 @@ Before proceeding, please check:
167174
168175
ksql> DESCRIBE pageviews_regions;
169176
170-
Field | Type
171-
----------------------------
172-
ROWTIME | BIGINT
173-
ROWKEY | VARCHAR(STRING)
174-
GENDER | VARCHAR(STRING)
175-
REGIONID | VARCHAR(STRING)
176-
NUMUSERS | BIGINT
177-
```
177+
Field | Type
178+
--------------------------------------
179+
ROWTIME | BIGINT (system)
180+
ROWKEY | VARCHAR(STRING) (system)
181+
GENDER | VARCHAR(STRING) (key)
182+
REGIONID | VARCHAR(STRING) (key)
183+
NUMUSERS | BIGINT
184+
--------------------------------------
185+
For runtime statistics and query details run: DESCRIBE EXTENDED <Stream,Table>;
186+
```
178187

179188
6. Use `SELECT` to view results from the above query.
180189

@@ -195,11 +204,12 @@ Before proceeding, please check:
195204
```bash
196205
ksql> SHOW QUERIES;
197206
198-
Query ID | Kafka Topic | Query String
199-
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
200-
CTAS_PAGEVIEWS_REGIONS | PAGEVIEWS_FEMALE | CREATE STREAM pageviews_female AS SELECT users_original.userid AS userid, pageid, regionid, gender FROM pageviews_original LEFT JOIN users_original ON pageviews_original.userid = users_original.userid WHERE gender = 'FEMALE';
201-
CSAS_PAGEVIEWS_FEMALE | pageviews_enriched_r8_r9 | CREATE STREAM pageviews_female_like_89 WITH (kafka_topic='pageviews_enriched_r8_r9', value_format='DELIMITED') AS SELECT * FROM pageviews_female WHERE regionid LIKE '%_8' OR regionid LIKE '%_9';
202-
CSAS_PAGEVIEWS_FEMALE_LIKE_89 | PAGEVIEWS_REGIONS | CREATE TABLE pageviews_regions AS SELECT gender, regionid , COUNT(*) AS numusers FROM pageviews_female WINDOW TUMBLING (size 30 second) GROUP BY gender, regionid HAVING COUNT(*) > 1;
207+
Query ID | Kafka Topic | Query String
208+
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
209+
CTAS_PAGEVIEWS_REGIONS | PAGEVIEWS_REGIONS | CREATE TABLE pageviews_regions WITH (value_format='avro') AS SELECT gender, regionid , COUNT(*) AS numusers FROM pageviews_female WINDOW TUMBLING (size 30 second) GROUP BY gender, regionid HAVING COUNT(*) > 1;
210+
CSAS_PAGEVIEWS_FEMALE | PAGEVIEWS_FEMALE | CREATE STREAM pageviews_female AS SELECT users_original.userid AS userid, pageid, regionid, gender FROM pageviews_original LEFT JOIN users_original ON pageviews_original.userid = users_original.userid WHERE gender = 'FEMALE';
211+
CSAS_PAGEVIEWS_FEMALE_LIKE_89 | pageviews_enriched_r8_r9 | CREATE STREAM pageviews_female_like_89 WITH (kafka_topic='pageviews_enriched_r8_r9', value_format='DELIMITED') AS SELECT * FROM pageviews_female WHERE regionid LIKE '%_8' OR regionid LIKE '%_9';
212+
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
203213
```
204214

205215

0 commit comments

Comments
 (0)