提交 3263ffa2 编写于 作者: sangshuduo's avatar sangshuduo

docs: update windows/mac status and fixed few typos

上级 43e6f255
...@@ -20,7 +20,7 @@ The major features are listed below: ...@@ -20,7 +20,7 @@ The major features are listed below:
- Supports exporting data via tool [taosDump](../data-out/taosdump/). - Supports exporting data via tool [taosDump](../data-out/taosdump/).
- Supports writing data to [Prometheus](../data-out/prometheus/). - Supports writing data to [Prometheus](../data-out/prometheus/).
- Supports exporting data via [data subscription](../tmq/). - Supports exporting data via [data subscription](../tmq/).
3. Data Explorer: browse through databases and even run SQL queryies once you login. 3. Data Explorer: browse through databases and even run SQL queries once you login.
4. Visualization: 4. Visualization:
- Supports [Grafana](../visual/grafana/) - Supports [Grafana](../visual/grafana/)
- Supports Google data studio (to be released soon) - Supports Google data studio (to be released soon)
......
...@@ -76,7 +76,7 @@ To obtain the value of cloud token and URL, please log in [TDengine Cloud](https ...@@ -76,7 +76,7 @@ To obtain the value of cloud token and URL, please log in [TDengine Cloud](https
## Connect ## Connect
Copy code bellow to your editor and run it. If you are using jupyter, assuming you have followed the guide about Jupyter in previous secions, you can copy the code into Jupyter editor in your browser. Copy code bellow to your editor and run it. If you are using jupyter, assuming you have followed the guide about Jupyter in previous sections, you can copy the code into Jupyter editor in your browser.
```python ```python
{{#include docs/examples/python/develop_tutorial.py:connect}} {{#include docs/examples/python/develop_tutorial.py:connect}}
......
--- ---
title: Data Model title: Data Model
desription: Typical Data Model used in TDengine description: Typical Data Model used in TDengine
--- ---
The data model employed by TDengine is similar to that of a relational database. You have to create databases and tables. You must design the data model based on your own business and application requirements. You should design the STable (an abbreviation for super table) schema to fit your data. This chapter will explain the big picture without getting into syntactical details. The data model employed by TDengine is similar to that of a relational database. You have to create databases and tables. You must design the data model based on your own business and application requirements. You should design the STable (an abbreviation for super table) schema to fit your data. This chapter will explain the big picture without getting into syntactical details.
......
...@@ -34,7 +34,7 @@ column_definition: ...@@ -34,7 +34,7 @@ column_definition:
SHOW STABLES [LIKE tb_name_wildcard]; SHOW STABLES [LIKE tb_name_wildcard];
``` ```
The preceding SQL statement shows all supertables in the current TDengine database, including the name, creation time, number of columns, number of tags, and number of subtabels for each supertable. The preceding SQL statement shows all supertables in the current TDengine database, including the name, creation time, number of columns, number of tags, and number of subtables for each supertable.
### View the CREATE Statement for a Supertable ### View the CREATE Statement for a Supertable
......
...@@ -237,7 +237,7 @@ You can also use the NULLS keyword to specify the position of null values. Ascen ...@@ -237,7 +237,7 @@ You can also use the NULLS keyword to specify the position of null values. Ascen
The LIMIT keyword controls the number of results that are displayed. You can also use the OFFSET keyword to specify the result to display first. `LIMIT` and `OFFSET` are executed after `ORDER BY` in the query execution. You can include an offset in a LIMIT clause. For example, LIMIT 5 OFFSET 2 can also be written LIMIT 2, 5. Both of these clauses display the third through the seventh results. The LIMIT keyword controls the number of results that are displayed. You can also use the OFFSET keyword to specify the result to display first. `LIMIT` and `OFFSET` are executed after `ORDER BY` in the query execution. You can include an offset in a LIMIT clause. For example, LIMIT 5 OFFSET 2 can also be written LIMIT 2, 5. Both of these clauses display the third through the seventh results.
In a statement that includes a PARTITON BY clause, the LIMIT keyword is performed on each partition, not on the entire set of results. In a statement that includes a PARTITION BY clause, the LIMIT keyword is performed on each partition, not on the entire set of results.
## SLIMIT ## SLIMIT
......
...@@ -488,7 +488,7 @@ All functions that return the current time, such as `NOW`, `TODAY`, and `TIMEZON ...@@ -488,7 +488,7 @@ All functions that return the current time, such as `NOW`, `TODAY`, and `TIMEZON
```sql ```sql
SELECT NOW() FROM { tb_name | stb_name } [WHERE clause]; SELECT NOW() FROM { tb_name | stb_name } [WHERE clause];
SELECT select_expr FROM { tb_name | stb_name } WHERE ts_col cond_operatior NOW(); SELECT select_expr FROM { tb_name | stb_name } WHERE ts_col cond_operator NOW();
INSERT INTO tb_name VALUES (NOW(), ...); INSERT INTO tb_name VALUES (NOW(), ...);
``` ```
...@@ -572,7 +572,7 @@ SELECT TIMEZONE() FROM { tb_name | stb_name } [WHERE clause]; ...@@ -572,7 +572,7 @@ SELECT TIMEZONE() FROM { tb_name | stb_name } [WHERE clause];
```sql ```sql
SELECT TODAY() FROM { tb_name | stb_name } [WHERE clause]; SELECT TODAY() FROM { tb_name | stb_name } [WHERE clause];
SELECT select_expr FROM { tb_name | stb_name } WHERE ts_col cond_operatior TODAY()]; SELECT select_expr FROM { tb_name | stb_name } WHERE ts_col cond_operator TODAY()];
INSERT INTO tb_name VALUES (TODAY(), ...); INSERT INTO tb_name VALUES (TODAY(), ...);
``` ```
...@@ -656,7 +656,7 @@ If you input a specific column, the number of non-null values in the column is r ...@@ -656,7 +656,7 @@ If you input a specific column, the number of non-null values in the column is r
SELECT ELAPSED(ts_primary_key [, time_unit]) FROM { tb_name | stb_name } [WHERE clause] [INTERVAL(interval [, offset]) [SLIDING sliding]]; SELECT ELAPSED(ts_primary_key [, time_unit]) FROM { tb_name | stb_name } [WHERE clause] [INTERVAL(interval [, offset]) [SLIDING sliding]];
``` ```
**Description**`elapsed` function can be used to calculate the continuous time length in which there is valid data. If it's used with `INTERVAL` clause, the returned result is the calcualted time length within each time window. If it's used without `INTERVAL` caluse, the returned result is the calculated time length within the specified time range. Please be noted that the return value of `elapsed` is the number of `time_unit` in the calculated time length. **Description**`elapsed` function can be used to calculate the continuous time length in which there is valid data. If it's used with `INTERVAL` clause, the returned result is the calculated time length within each time window. If it's used without `INTERVAL` caluse, the returned result is the calculated time length within the specified time range. Please be noted that the return value of `elapsed` is the number of `time_unit` in the calculated time length.
**Return value type**: Double if the input value is not NULL; **Return value type**: Double if the input value is not NULL;
...@@ -744,7 +744,7 @@ SELECT HYPERLOGLOG(field_name) FROM { tb_name | stb_name } [WHERE clause]; ...@@ -744,7 +744,7 @@ SELECT HYPERLOGLOG(field_name) FROM { tb_name | stb_name } [WHERE clause];
**Description**: **Description**:
The cardinal number of a specific column is returned by using hyperloglog algorithm. The benefit of using hyperloglog algorithm is that the memory usage is under control when the data volume is huge. The cardinal number of a specific column is returned by using hyperloglog algorithm. The benefit of using hyperloglog algorithm is that the memory usage is under control when the data volume is huge.
However, when the data volume is very small, the result may be not accurate, it's recommented to use `select count(data) from (select unique(col) as data from table)` in this case. However, when the data volume is very small, the result may be not accurate, it's recommended to use `select count(data) from (select unique(col) as data from table)` in this case.
**Return value type**: Integer **Return value type**: Integer
......
...@@ -109,7 +109,7 @@ SELECT COUNT(*) FROM temp_tb_1 INTERVAL(1m) SLIDING(2m); ...@@ -109,7 +109,7 @@ SELECT COUNT(*) FROM temp_tb_1 INTERVAL(1m) SLIDING(2m);
When using time windows, note the following: When using time windows, note the following:
- The window length for aggregation depends on the value of INTERVAL. The minimum interval is 10 ms. You can configure a window as an offset from UTC 0:00. The offset cannot be smaler than the interval. You can use SLIDING to specify the length of time that the window moves forward. - The window length for aggregation depends on the value of INTERVAL. The minimum interval is 10 ms. You can configure a window as an offset from UTC 0:00. The offset cannot be smaller than the interval. You can use SLIDING to specify the length of time that the window moves forward.
Please note that the `timezone` parameter should be configured to be the same value in the `taos.cfg` configuration file on client side and server side. Please note that the `timezone` parameter should be configured to be the same value in the `taos.cfg` configuration file on client side and server side.
- The result set is in ascending order of timestamp when you aggregate by time window. - The result set is in ascending order of timestamp when you aggregate by time window.
......
...@@ -55,7 +55,7 @@ description: JSON Data Type ...@@ -55,7 +55,7 @@ description: JSON Data Type
4. Tag Operations 4. Tag Operations
The value of a JSON tag can be altered. Please note that the full JSON will be overriden when doing this. The value of a JSON tag can be altered. Please note that the full JSON will be overridden when doing this.
The name of a JSON tag can be altered. The name of a JSON tag can be altered.
......
...@@ -217,7 +217,7 @@ There are about 200 keywords reserved by TDengine, they can't be used as the nam ...@@ -217,7 +217,7 @@ There are about 200 keywords reserved by TDengine, they can't be used as the nam
- STableS - STableS
- STAR - STAR
- STATE - STATE
- STATEMEN - STATEMENT
- STATE_WI - STATE_WI
- STORAGE - STORAGE
- STREAM - STREAM
......
...@@ -28,16 +28,22 @@ export TDENGINE_CLOUD_DSN="<DSN>" ...@@ -28,16 +28,22 @@ export TDENGINE_CLOUD_DSN="<DSN>"
``` ```
</TabItem> </TabItem>
<TabItem value="windows" label="Config on Windows (coming soon)"> <TabItem value="windows" label="Config on Windows (experimental)" groupId="sys">
Run this command in your Windows terminal to save cloud DSN as variable: Run this command in your Windows CMD prompt to save cloud DSN as variable:
```bash ```cmd
set TDENGINE_CLOUD_DSN="<DSN>" set TDENGINE_CLOUD_DSN=<DSN>
```
Or run this command in your Windows PowerShell environment to save cloud DSN as variable:
```cmd
$env:TDENGINE_CLOUD_DSN='<DSN>'
``` ```
</TabItem> </TabItem>
<TabItem value="mac" label="Config on Mac (coming soon)" groupId="sys"> <TabItem value="mac" label="Config on Mac (experimental)" groupId="sys">
Run this command in your Mac terminal to save cloud DSN as variable: Run this command in your Mac terminal to save cloud DSN as variable:
......
...@@ -41,7 +41,7 @@ namespace TDengineExample ...@@ -41,7 +41,7 @@ namespace TDengineExample
// 5. execute // 5. execute
res = TDengine.StmtExecute(stmt); res = TDengine.StmtExecute(stmt);
CheckStmtRes(res, "faild to execute"); CheckStmtRes(res, "failed to execute");
// 6. free // 6. free
TaosMultiBind.FreeTaosBind(tags); TaosMultiBind.FreeTaosBind(tags);
...@@ -90,7 +90,7 @@ namespace TDengineExample ...@@ -90,7 +90,7 @@ namespace TDengineExample
int code = TDengine.StmtClose(stmt); int code = TDengine.StmtClose(stmt);
if (code != 0) if (code != 0)
{ {
Console.WriteLine($"falied to close stmt, {code} reason: {TDengine.StmtErrorStr(stmt)} "); Console.WriteLine($"failed to close stmt, {code} reason: {TDengine.StmtErrorStr(stmt)} ");
} }
ExitProgram(); ExitProgram();
} }
......
...@@ -17,7 +17,7 @@ stmt.execute("INSERT INTO power.d1001 USING power.meters TAGS(California.SanFran ...@@ -17,7 +17,7 @@ stmt.execute("INSERT INTO power.d1001 USING power.meters TAGS(California.SanFran
ResultSet result = stmt.executeQuery("SELECT ts, current FROM power.meters LIMIT 2"); ResultSet result = stmt.executeQuery("SELECT ts, current FROM power.meters LIMIT 2");
// ANCHOR_END: query // ANCHOR_END: query
// ANCHOR: meta // ANCHOR: meta
// print colum names // print column names
ResultSetMetaData meta = result.getMetaData(); ResultSetMetaData meta = result.getMetaData();
System.out.println(meta.getColumnLabel(1) + "\t" + meta.getColumnLabel(2)); System.out.println(meta.getColumnLabel(1) + "\t" + meta.getColumnLabel(2));
// output: ts current // output: ts current
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册