This is an automated email from the ASF dual-hosted git repository. xuekaifeng pushed a commit to branch change_spark_md in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit e4eb867703ee94a8185c42a6dcf3138fcee6c714 Author: 151250176 <[email protected]> AuthorDate: Thu Dec 31 09:52:07 2020 +0800 change md format in spark --- spark-iotdb-connector/Readme.md | 32 ++++++++++++++------------------ spark-tsfile/README.md | 31 +++++++++++++------------------ 2 files changed, 27 insertions(+), 36 deletions(-) diff --git a/spark-iotdb-connector/Readme.md b/spark-iotdb-connector/Readme.md index 5fa1993..1b29530 100644 --- a/spark-iotdb-connector/Readme.md +++ b/spark-iotdb-connector/Readme.md @@ -76,28 +76,24 @@ df.show() Take the following TsFile structure as an example: There are three Measurements in the TsFile schema: status, temperature, and hardware. The basic information of these three measurements is as follows: -<center> -<table style="text-align:center"> - <tr><th colspan="2">Name</th><th colspan="2">Type</th><th colspan="2">Encode</th></tr> - <tr><td colspan="2">status</td><td colspan="2">Boolean</td><td colspan="2">PLAIN</td></tr> - <tr><td colspan="2">temperature</td><td colspan="2">Float</td><td colspan="2">RLE</td></tr> - <tr><td colspan="2">hardware</td><td colspan="2">Text</td><td colspan="2">PLAIN</td></tr> -</table> -</center> +| name | type | encode| +|------|------|-------| +| status | Boolean | PLAIN| +| temperature | Float | RLE| +| hardware | Text | PLAIN| + The existing data in the TsFile is as follows: -<center> -<table style="text-align:center"> - <tr><th colspan="4">device:root.ln.wf01.wt01</th><th colspan="4">device:root.ln.wf02.wt02</th></tr> - <tr><th colspan="2">status</th><th colspan="2">temperature</th><th colspan="2">hardware</th><th colspan="2">status</th></tr> - <tr><th>time</th><th>value</td><th>time</th><th>value</td><th>time</th><th>value</th><th>time</th><th>value</td></tr> - <tr><td>1</td><td>True</td><td>1</td><td>2.2</td><td>2</td><td>"aaa"</td><td>1</td><td>True</td></tr> - <tr><td>3</td><td>True</td><td>2</td><td>2.2</td><td>4</td><td>"bbb"</td><td>2</td><td>False</td></tr> - <tr><td>5</td><td> False </td><td>3</td><td>2.1</td><td>6</td><td>"ccc"</td><td>4</td><td>True</td></tr> -</table> -</center> +| root.ln.wf01.wt01 | | root.ln.wf02.wt02 | | | | | | +|------|------------|-----|--------|------|-------|------|-------| +| status | | temperature | | hardware | | status | | +| time | value | time | value | time | value | +| 1 | True | 1 | 2.2 | 2 | "aaa" | 1 | True +| 3 | True | 2 | 2.2 | 4 | "bbb" | 2 | False +| 5 | False | 3 | 2.1 | 6 | "ccc" | 4 | True + The wide(default) table form is as follows: diff --git a/spark-tsfile/README.md b/spark-tsfile/README.md index b916b99..f41ad03 100644 --- a/spark-tsfile/README.md +++ b/spark-tsfile/README.md @@ -82,28 +82,23 @@ Note: The way to display TsFile is dependent on the schema. Take the following TsFile structure as an example: There are three Measurements in the TsFile schema: status, temperature, and hardware. The basic information of these three measurements is as follows: -<center> -<table style="text-align:center"> - <tr><th colspan="2">Name</th><th colspan="2">Type</th><th colspan="2">Encode</th></tr> - <tr><td colspan="2">status</td><td colspan="2">Boolean</td><td colspan="2">PLAIN</td></tr> - <tr><td colspan="2">temperature</td><td colspan="2">Float</td><td colspan="2">RLE</td></tr> - <tr><td colspan="2">hardware</td><td colspan="2">Text</td><td colspan="2">PLAIN</td></tr> -</table> -</center> +| name | type | encode| +|------|------|-------| +| status | Boolean | PLAIN| +| temperature | Float | RLE| +| hardware | Text | PLAIN| + The existing data in the TsFile is as follows: -<center> -<table style="text-align:center"> - <tr><th colspan="4">device:root.ln.wf01.wt01</th><th colspan="4">device:root.ln.wf02.wt02</th></tr> - <tr><th colspan="2">status</th><th colspan="2">temperature</th><th colspan="2">hardware</th><th colspan="2">status</th></tr> - <tr><th>time</th><th>value</td><th>time</th><th>value</td><th>time</th><th>value</th><th>time</th><th>value</td></tr> - <tr><td>1</td><td>True</td><td>1</td><td>2.2</td><td>2</td><td>"aaa"</td><td>1</td><td>True</td></tr> - <tr><td>3</td><td>True</td><td>2</td><td>2.2</td><td>4</td><td>"bbb"</td><td>2</td><td>False</td></tr> - <tr><td>5</td><td> False </td><td>3</td><td>2.1</td><td>6</td><td>"ccc"</td><td>4</td><td>True</td></tr> -</table> -</center> +| root.ln.wf01.wt01 | | root.ln.wf02.wt02 | | | | | | +|------|------------|-----|--------|------|-------|------|-------| +| status | | temperature | | hardware | | status | | +| time | value | time | value | time | value | +| 1 | True | 1 | 2.2 | 2 | "aaa" | 1 | True +| 3 | True | 2 | 2.2 | 4 | "bbb" | 2 | False +| 5 | False | 3 | 2.1 | 6 | "ccc" | 4 | True The corresponding SparkSQL table is as follows:
