You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by Xiangdong Huang <sa...@gmail.com> on 2019/09/10 18:50:21 UTC
How to use the new table schema of Spark-Connector
Hi,
As PR[1] has been merged, but I can not find how to use the new feature
from the iotdb.apache.org or even spark/Readme.md.
What is more, even I read the introduction about this PR, I can only get
how to use it in scala, but how to use it in Java?
[1] https://github.com/apache/incubator-iotdb/pull/303
Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University
黄向东
清华大学 软件学院
Re: How to use the new table schema of Spark-Connector
Posted by Xiangdong Huang <sa...@gmail.com>.
Hi,
Okey.. I read the source code and find a new option called "form" is added:
if we want to use the wide table, write Java codes like:
```
Dataset<Row> df =
spark.read().format("org.apache.iotdb.tsfile").load("TSFILE PATH");
df.show();
```
If we want to use the narrow table, write Java codes like:
```
Dataset<Row> df =
spark.read().format("org.apache.iotdb.tsfile").option("form",
"narrow_form").load("TSFILE PATH");
df.show();
```
It should be commented in the document, I think.
Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University
黄向东
清华大学 软件学院
Xiangdong Huang <sa...@gmail.com> 于2019年9月10日周二 上午11:50写道:
> Hi,
>
> As PR[1] has been merged, but I can not find how to use the new feature
> from the iotdb.apache.org or even spark/Readme.md.
>
> What is more, even I read the introduction about this PR, I can only get
> how to use it in scala, but how to use it in Java?
>
> [1] https://github.com/apache/incubator-iotdb/pull/303
>
> Best,
> -----------------------------------
> Xiangdong Huang
> School of Software, Tsinghua University
>
> 黄向东
> 清华大学 软件学院
>
Re: How to use the new table schema of Spark-Connector
Posted by Lei Rui <ne...@163.com>.
Hi,
The website page http://iotdb.apache.org/#/Tools/Spark does not link to the latest https://github.com/apache/incubator-iotdb/blob/master/docs/Documentation/UserGuide/9-Tools-spark.md.
I'm afraid that the website is not based on the master branch. Can someone validate that?
Yes I think adding the java version example is user-friendly.
Sincerely,
Lei Rui
On 9/11/2019 09:13,南京大学软件学院薛恺丰<82...@qq.com> wrote:
Hi,
Thanks for trying this new feature. The document of this feature is in /docs/Documentation/UserGuide/9-Tools-spark but only in scala. Should I add java version? They will be quite similar.
Best,
Kaifeng Xue
------------------ 原始邮件 ------------------
发件人: "Xiangdong Huang"<sa...@gmail.com>;
发送时间: 2019年9月11日(星期三) 凌晨2:50
收件人: "dev"<de...@iotdb.apache.org>;
主题: How to use the new table schema of Spark-Connector
Hi,
As PR[1] has been merged, but I can not find how to use the new feature
from the iotdb.apache.org or even spark/Readme.md.
What is more, even I read the introduction about this PR, I can only get
how to use it in scala, but how to use it in Java?
[1] https://github.com/apache/incubator-iotdb/pull/303
Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University
黄向东
清华大学 软件学院
回复:How to use the new table schema of Spark-Connector
Posted by 南京大学软件学院薛恺丰 <82...@qq.com>.
Hi,
Thanks for trying this new feature. The document of this feature is in /docs/Documentation/UserGuide/9-Tools-spark but only in scala. Should I add java version? They will be quite similar.
Best,
Kaifeng Xue
------------------ 原始邮件 ------------------
发件人: "Xiangdong Huang"<sa...@gmail.com>;
发送时间: 2019年9月11日(星期三) 凌晨2:50
收件人: "dev"<de...@iotdb.apache.org>;
主题: How to use the new table schema of Spark-Connector
Hi,
As PR[1] has been merged, but I can not find how to use the new feature
from the iotdb.apache.org or even spark/Readme.md.
What is more, even I read the introduction about this PR, I can only get
how to use it in scala, but how to use it in Java?
[1] https://github.com/apache/incubator-iotdb/pull/303
Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University
黄向东
清华大学 软件学院