From 2656f5746e8b818781f9297adc7f3f3af953e35f Mon Sep 17 00:00:00 2001 From: Sean Ely <105326513+sean-tdengine@users.noreply.github.com> Date: Mon, 22 Aug 2022 13:01:31 -0700 Subject: [PATCH 1/2] docs: Get Started - Docker - fixed sequencing 1. The CLI should come after Benchmark, otherwise it's confusing. 2. taos > shouldn't be in the command lines, otherwise users can copy and paste. 3. California.SanFrancisco doesn't match the current taosBenchmark --- docs/en/05-get-started/01-docker.md | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/en/05-get-started/01-docker.md b/docs/en/05-get-started/01-docker.md index 869390cd6c..86680bd00f 100644 --- a/docs/en/05-get-started/01-docker.md +++ b/docs/en/05-get-started/01-docker.md @@ -31,17 +31,6 @@ You can now access TDengine or run other Linux commands. Note: For information about installing docker, see the [official documentation](https://docs.docker.com/get-docker/). -## Open the TDengine CLI - -On the container, run the following command to open the TDengine CLI: - -``` -$ taos - -taos> - -``` - ## Insert Data into TDengine You can use the `taosBenchmark` tool included with TDengine to write test data into your deployment. @@ -59,38 +48,49 @@ To do so, run the following command: You can customize the test deployment that taosBenchmark creates by specifying command-line parameters. For information about command-line parameters, run the `taosBenchmark --help` command. For more information about taosBenchmark, see [taosBenchmark](/reference/taosbenchmark). +## Open the TDengine CLI + +On the container, run the following command to open the TDengine CLI: + +``` +$ taos + +taos> + +``` + ## Query Data in TDengine After using taosBenchmark to create your test deployment, you can run queries in the TDengine CLI to test its performance. For example: -Query the number of rows in the `meters` supertable: +From the TDengine CLI query the number of rows in the `meters` supertable: ```sql -taos> select count(*) from test.meters; +select count(*) from test.meters; ``` Query the average, maximum, and minimum values of all 100 million rows of data: ```sql -taos> select avg(current), max(voltage), min(phase) from test.meters; +select avg(current), max(voltage), min(phase) from test.meters; ``` -Query the number of rows whose `location` tag is `California.SanFrancisco`: +Query the number of rows whose `location` tag is `San Francisco`: ```sql -taos> select count(*) from test.meters where location="San Francisco"; +select count(*) from test.meters where location="San Francisco"; ``` Query the average, maximum, and minimum values of all rows whose `groupId` tag is `10`: ```sql -taos> select avg(current), max(voltage), min(phase) from test.meters where groupId=10; +select avg(current), max(voltage), min(phase) from test.meters where groupId=10; ``` Query the average, maximum, and minimum values for table `d10` in 10 second intervals: ```sql -taos> select avg(current), max(voltage), min(phase) from test.d10 interval(10s); +select avg(current), max(voltage), min(phase) from test.d10 interval(10s); ``` ## Additional Information From 8d660c0c4f306121e1a4217e79ebdbdddc611e3e Mon Sep 17 00:00:00 2001 From: Sean Ely <105326513+sean-tdengine@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:39:37 -0700 Subject: [PATCH 2/2] Update 01-docker.md --- docs/en/05-get-started/01-docker.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en/05-get-started/01-docker.md b/docs/en/05-get-started/01-docker.md index 86680bd00f..32eee6b942 100644 --- a/docs/en/05-get-started/01-docker.md +++ b/docs/en/05-get-started/01-docker.md @@ -87,11 +87,12 @@ Query the average, maximum, and minimum values of all rows whose `groupId` tag i select avg(current), max(voltage), min(phase) from test.meters where groupId=10; ``` -Query the average, maximum, and minimum values for table `d10` in 10 second intervals: +Query the average, maximum, and minimum values for table `d10` in 1 second intervals: ```sql -select avg(current), max(voltage), min(phase) from test.d10 interval(10s); +select first(ts), avg(current), max(voltage), min(phase) from test.d10 interval(1s); ``` +In the query above you are selecting the first timestamp (ts) in the interval, another way of selecting this would be _wstart which will give the start of the time window. For more information about windowed queries, see [Time-Series Extensions](../../taos-sql/distinguished/). ## Additional Information