wuchong commented on a change in pull request #16245:
URL: https://github.com/apache/flink/pull/16245#discussion_r659116339
##########
File path: docs/content/docs/dev/table/sqlClient.md
##########
@@ -60,106 +59,72 @@ or explicitly use `embedded` mode:
./bin/sql-client.sh embedded
```
+See [SQL Client startup options](#sql-client-startup-options) below for more
details.
+
### Running SQL Queries
-Once the CLI has been started, you can use the `HELP` command to list all
available SQL statements.
-For validating your setup and cluster connection, you can enter your first SQL
query and press the `Enter` key to execute it:
+For validating your setup and cluster connection, you can enter the simple
query below and press `Enter` to execute it.
```sql
-SELECT 'Hello World';
+SELECT
+ name,
+ COUNT(*) AS cnt
+FROM
+ (VALUES ('Bob'), ('Alice'), ('Greg'), ('Bob')) AS NameTable(name)
+GROUP BY name;
```
-This query requires no table source and produces a single row result. The CLI
will retrieve results
-from the cluster and visualize them. You can close the result view by pressing
the `Q` key.
-
-The CLI supports **three modes** for maintaining and visualizing results.
-
-The **table mode** materializes results in memory and visualizes them in a
regular, paginated table representation.
-It can be enabled by executing the following command in the CLI:
+The SQL client will retrieve the results from the cluster and visualize them
(you can close the result view by pressing the `Q` key):
```text
-SET 'sql-client.execution.result-mode' = 'table';
+ name cnt
+ Alice 1
+ Greg 1
+ Bob 2
```
-The **changelog mode** does not materialize results and visualizes the result
stream that is produced
-by a [continuous query]({{< ref "docs/dev/table/concepts/dynamic_tables"
>}}#continuous-queries) consisting of insertions (`+`) and retractions (`-`).
+The `SET` command allows you to tune the job execution and the sql client
behaviour. See [SQL Client Configuration](#sql-client-configuration) below for
more details.
-```text
-SET 'sql-client.execution.result-mode' = 'changelog';
-```
+After a query is defined, it can be submitted to the cluster as a
long-running, detached Flink job.
+The [configuration section](#configuration) explains how to declare table
sources for reading data, how to declare table sinks for writing data, and how
to configure other table program properties.
-The **tableau mode** is more like a traditional way which will display the
results in the screen directly with a tableau format.
-The displaying content will be influenced by the query execution
type(`execution.type`).
-```text
-SET 'sql-client.execution.result-mode' = 'tableau';
-```
-
-Note that when you use this mode with streaming query, the result will be
continuously printed on the console. If the input data of
-this query is bounded, the job will terminate after Flink processed all input
data, and the printing will also be stopped automatically.
-Otherwise, if you want to terminate a running query, just type `CTRL-C` in
this case, the job and the printing will be stopped.
+### Getting help
-You can use the following query to see all the result modes in action:
-
-```sql
-SELECT name, COUNT(*) AS cnt FROM (VALUES ('Bob'), ('Alice'), ('Greg'),
('Bob')) AS NameTable(name) GROUP BY name;
-```
-
-This query performs a bounded word count example.
-
-In *changelog mode*, the visualized changelog should be similar to:
+The documentation of the SQL client commands can be accessed as follows:
Review comment:
There is already an pending PR for this #16060. Would be great to help
to review the PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]