未验证 提交 a57ffb27 编写于 作者: W wade zhang 提交者: GitHub

Merge pull request #17127 from taosdata/wangmm0220-patch-4-1

Update 04-opentsdb-json.mdx
...@@ -48,7 +48,7 @@ Please refer to [OpenTSDB HTTP API](http://opentsdb.net/docs/build/html/api_http ...@@ -48,7 +48,7 @@ Please refer to [OpenTSDB HTTP API](http://opentsdb.net/docs/build/html/api_http
- In JSON protocol, strings will be converted to nchar type and numeric values will be converted to double type. - In JSON protocol, strings will be converted to nchar type and numeric values will be converted to double type.
- Only data in array format is accepted and so an array must be used even if there is only one row. - Only data in array format is accepted and so an array must be used even if there is only one row.
- The defult child table name is generated by rules.You can configure smlChildTableName in taos.cfg to specify chile table names, for example, `smlChildTableName=tname`. You can insert `"tags": { "host": "web02","dc": "lga","tname":"cpu1"}` and the cpu1 table will be automatically created. Note that if multiple rows have the same tname but different tag_set values, the tag_set of the first row is used to create the table and the others are ignored.
::: :::
## Examples ## Examples
...@@ -94,3 +94,6 @@ taos> select * from `meters.current`; ...@@ -94,3 +94,6 @@ taos> select * from `meters.current`;
2022-03-28 09:56:51.250 | 12.600000000 | 2.000000000 | California.SanFrancisco | 2022-03-28 09:56:51.250 | 12.600000000 | 2.000000000 | California.SanFrancisco |
Query OK, 2 row(s) in set (0.004076s) Query OK, 2 row(s) in set (0.004076s)
``` ```
## Query Examples
If you want query the data of "tags": {"location": "California.LosAngeles", "groupid": 1},here is the query sql:
select * from `meters.voltage` where location="California.LosAngeles" and groupid=1
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册