You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by Etienne Robinet <43...@etu.he2b.be> on 2020/03/03 12:35:56 UTC

Prepared Statements/ Commit

Hi all,
could it be that IoTDB doesn't support prepared statements? When I try to use the SQL component of Camel, this is the error I get:https://i.imgur.com/HOJgh0H.png

when I use JDBC component I get an error message "Not support Commit". I am confused now on how to use camel with IoTDB.
Etienne

Re: Prepared Statements/ Commit

Posted by "Robinet, Etienne" <43...@etu.he2b.be>.
Hi,
Yes I am using Karaf, I am currently testing and discussing about creating
a temporary Camel component, but I will also try this approach.

Le mar. 3 mars 2020 à 16:01, Willem Jiang <wi...@gmail.com> a écrit :

> With Bean API[1], you can write a customer Bean to use the Session API
> to send the data into IoTDB.
> Just a quick question, are you using Karaf (OSGi) this time?
> If so, you may need to provide a wrapped OSGi IoTDB client jar for it.
>
> [1]
> https://camel.apache.org/manual/latest/parameter-binding-annotations.html
>
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Tue, Mar 3, 2020 at 9:35 PM Robinet, Etienne <43...@etu.he2b.be> wrote:
> >
> > Hi,
> > sadly I am pretty new at using camel and never worked with NoSQL DB but I
> > found this:
> >
> https://rterp.wordpress.com/2014/07/25/writing-to-a-nosql-db-using-camel/
> >
> >  Also, here is a blueprint I used with Oracle DB:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> >            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >            xmlns:cm="
> > http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
> >            xsi:schemaLocation="
> >          http://www.osgi.org/xmlns/blueprint/v1.0.0
> > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> >          http://camel.apache.org/schema/blueprint
> > http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
> >          http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
> > http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">
> >
> >
> > <camelContext id="TestContext" xmlns="
> > http://camel.apache.org/schema/blueprint">
> >
> > <route id="Route1">
> >
> > <from uri="file://c:/test/in?delete=true"/>
> > <setBody><simple>Route1 :: ${body}</simple></setBody>
> >       <to uri="sql:insert into test1_t(text)
> > values(:#${body})?dataSource=my-db"/>
> > </route>
> >
> > </camelContext>
> >
> >
> > <!-- The container provides a DataSource service connected to the
> database
> > -->
> > <reference id="my-db" interface="javax.sql.DataSource" filter="(
> > osgi.jndi.service.name=testDB)"/>
> >
> >
> > </blueprint>
> >
> > Le mar. 3 mars 2020 à 14:09, Xiangdong Huang <sa...@gmail.com> a
> écrit :
> >
> > > Hi Etienne,
> > >
> > > Can you share an example for integration Camel with some other DB
> (NoSQL is
> > > better)?
> > > It will be helpful to let us evaluate how to integrate with IoTDB.
> > >
> > > Best,
> > > ----------------------------------
> > > Xiangdong Huang
> > > School of Software, Tsinghua University
> > >
> > >  黄向东
> > > 清华大学 软件学院
> > >
> > >
> > > Jialin Qiao <qj...@mails.tsinghua.edu.cn> 于2020年3月3日周二 下午9:04写道:
> > >
> > > > Hi,
> > > >
> > > > If you only need a java api, the Session API is enough and better
> than
> > > > JDBC.
> > > >
> > > > There is an example about Session API:
> > > >
> > > >
> > >
> https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java
> > > >
> > > > I'm not familiar with Camel, but when integrating with rocketmq or
> kafka,
> > > > the consumer could use Session API to write data into IoTDB.
> > > >
> > > > Thanks,
> > > > --
> > > > Jialin Qiao
> > > > School of Software, Tsinghua University
> > > >
> > > > 乔嘉林
> > > > 清华大学 软件学院
> > > >
> > > > > -----原始邮件-----
> > > > > 发件人: "Robinet, Etienne" <43...@etu.he2b.be>
> > > > > 发送时间: 2020-03-03 20:55:43 (星期二)
> > > > > 收件人: dev@iotdb.apache.org
> > > > > 抄送:
> > > > > 主题: Re: Prepared Statements/ Commit
> > > > >
> > > > > Hi,
> > > > > Can I use this session API in combination with camel?
> > > > >
> > > > > Le mar. 3 mars 2020 à 13:54, Jialin Qiao <
> qjl16@mails.tsinghua.edu.cn>
> > > a
> > > > > écrit :
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > PreparedStatement is not supported now. Instead, you could use
> > > Session
> > > > > > API, which also avoids the sql parser.
> > > > > >
> > > > > > Thanks,
> > > > > > --
> > > > > > Jialin Qiao
> > > > > > School of Software, Tsinghua University
> > > > > >
> > > > > > 乔嘉林
> > > > > > 清华大学 软件学院
> > > > > >
> > > > > > > -----原始邮件-----
> > > > > > > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
> > > > > > > 发送时间: 2020-03-03 20:35:56 (星期二)
> > > > > > > 收件人: dev@iotdb.apache.org
> > > > > > > 抄送:
> > > > > > > 主题: Prepared Statements/ Commit
> > > > > > >
> > > > > > > Hi all,
> > > > > > > could it be that IoTDB doesn't support prepared statements?
> When I
> > > > try
> > > > > > to use the SQL component of Camel, this is the error I get:
> > > > > > https://i.imgur.com/HOJgh0H.png
> > > > > > >
> > > > > > > when I use JDBC component I get an error message "Not support
> > > > Commit". I
> > > > > > am confused now on how to use camel with IoTDB.
> > > > > > > Etienne
> > > > > >
> > > >
> > >
>

Re: Prepared Statements/ Commit

Posted by Willem Jiang <wi...@gmail.com>.
With Bean API[1], you can write a customer Bean to use the Session API
to send the data into IoTDB.
Just a quick question, are you using Karaf (OSGi) this time?
If so, you may need to provide a wrapped OSGi IoTDB client jar for it.

[1]https://camel.apache.org/manual/latest/parameter-binding-annotations.html


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Tue, Mar 3, 2020 at 9:35 PM Robinet, Etienne <43...@etu.he2b.be> wrote:
>
> Hi,
> sadly I am pretty new at using camel and never worked with NoSQL DB but I
> found this:
> https://rterp.wordpress.com/2014/07/25/writing-to-a-nosql-db-using-camel/
>
>  Also, here is a blueprint I used with Oracle DB:
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>            xmlns:cm="
> http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
>            xsi:schemaLocation="
>          http://www.osgi.org/xmlns/blueprint/v1.0.0
> https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
>          http://camel.apache.org/schema/blueprint
> http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
>          http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
> http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">
>
>
> <camelContext id="TestContext" xmlns="
> http://camel.apache.org/schema/blueprint">
>
> <route id="Route1">
>
> <from uri="file://c:/test/in?delete=true"/>
> <setBody><simple>Route1 :: ${body}</simple></setBody>
>       <to uri="sql:insert into test1_t(text)
> values(:#${body})?dataSource=my-db"/>
> </route>
>
> </camelContext>
>
>
> <!-- The container provides a DataSource service connected to the database
> -->
> <reference id="my-db" interface="javax.sql.DataSource" filter="(
> osgi.jndi.service.name=testDB)"/>
>
>
> </blueprint>
>
> Le mar. 3 mars 2020 à 14:09, Xiangdong Huang <sa...@gmail.com> a écrit :
>
> > Hi Etienne,
> >
> > Can you share an example for integration Camel with some other DB (NoSQL is
> > better)?
> > It will be helpful to let us evaluate how to integrate with IoTDB.
> >
> > Best,
> > ----------------------------------
> > Xiangdong Huang
> > School of Software, Tsinghua University
> >
> >  黄向东
> > 清华大学 软件学院
> >
> >
> > Jialin Qiao <qj...@mails.tsinghua.edu.cn> 于2020年3月3日周二 下午9:04写道:
> >
> > > Hi,
> > >
> > > If you only need a java api, the Session API is enough and better than
> > > JDBC.
> > >
> > > There is an example about Session API:
> > >
> > >
> > https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java
> > >
> > > I'm not familiar with Camel, but when integrating with rocketmq or kafka,
> > > the consumer could use Session API to write data into IoTDB.
> > >
> > > Thanks,
> > > --
> > > Jialin Qiao
> > > School of Software, Tsinghua University
> > >
> > > 乔嘉林
> > > 清华大学 软件学院
> > >
> > > > -----原始邮件-----
> > > > 发件人: "Robinet, Etienne" <43...@etu.he2b.be>
> > > > 发送时间: 2020-03-03 20:55:43 (星期二)
> > > > 收件人: dev@iotdb.apache.org
> > > > 抄送:
> > > > 主题: Re: Prepared Statements/ Commit
> > > >
> > > > Hi,
> > > > Can I use this session API in combination with camel?
> > > >
> > > > Le mar. 3 mars 2020 à 13:54, Jialin Qiao <qj...@mails.tsinghua.edu.cn>
> > a
> > > > écrit :
> > > >
> > > > > Hi,
> > > > >
> > > > > PreparedStatement is not supported now. Instead, you could use
> > Session
> > > > > API, which also avoids the sql parser.
> > > > >
> > > > > Thanks,
> > > > > --
> > > > > Jialin Qiao
> > > > > School of Software, Tsinghua University
> > > > >
> > > > > 乔嘉林
> > > > > 清华大学 软件学院
> > > > >
> > > > > > -----原始邮件-----
> > > > > > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
> > > > > > 发送时间: 2020-03-03 20:35:56 (星期二)
> > > > > > 收件人: dev@iotdb.apache.org
> > > > > > 抄送:
> > > > > > 主题: Prepared Statements/ Commit
> > > > > >
> > > > > > Hi all,
> > > > > > could it be that IoTDB doesn't support prepared statements? When I
> > > try
> > > > > to use the SQL component of Camel, this is the error I get:
> > > > > https://i.imgur.com/HOJgh0H.png
> > > > > >
> > > > > > when I use JDBC component I get an error message "Not support
> > > Commit". I
> > > > > am confused now on how to use camel with IoTDB.
> > > > > > Etienne
> > > > >
> > >
> >

Re: Prepared Statements/ Commit

Posted by Xiangdong Huang <sa...@gmail.com>.
Hi,

@Etienne many thanks for your link, I will read it later.

@Julian can you give us a link to help me understand that?

Hi @Willem Jiang (the IoTDB mentor and the Camel committer), how do you
think about that?

Best.
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

 黄向东
清华大学 软件学院


Robinet, Etienne <43...@etu.he2b.be> 于2020年3月3日周二 下午10:25写道:

> Hi Julian,
> you're thinking about creating a Camel component?
>
> Le mar. 3 mars 2020 à 15:24, Julian Feinauer <j.feinauer@pragmaticminds.de
> >
> a écrit :
>
> > Hi,
> >
> > another alternative would be to add a "native" IoTDB Integration like
> .e.g
> > we did in PLC4X. Its not that hard and should be easy for the IoTDB
> > community.
> >
> > What about that?
> >
> > Julian
> >
> > Am 03.03.20, 14:35 schrieb "Robinet, Etienne" <43...@etu.he2b.be>:
> >
> >     Hi,
> >     sadly I am pretty new at using camel and never worked with NoSQL DB
> > but I
> >     found this:
> >
> >
> https://rterp.wordpress.com/2014/07/25/writing-to-a-nosql-db-using-camel/
> >
> >      Also, here is a blueprint I used with Oracle DB:
> >     <?xml version="1.0" encoding="UTF-8"?>
> >     <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> >                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >                xmlns:cm="
> >     http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
> >                xsi:schemaLocation="
> >              http://www.osgi.org/xmlns/blueprint/v1.0.0
> >     https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> >              http://camel.apache.org/schema/blueprint
> >     http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
> >              http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
> >     http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
> ">
> >
> >
> >     <camelContext id="TestContext" xmlns="
> >     http://camel.apache.org/schema/blueprint">
> >
> >     <route id="Route1">
> >
> >     <from uri="file://c:/test/in?delete=true"/>
> >     <setBody><simple>Route1 :: ${body}</simple></setBody>
> >           <to uri="sql:insert into test1_t(text)
> >     values(:#${body})?dataSource=my-db"/>
> >     </route>
> >
> >     </camelContext>
> >
> >
> >     <!-- The container provides a DataSource service connected to the
> > database
> >     -->
> >     <reference id="my-db" interface="javax.sql.DataSource" filter="(
> >     osgi.jndi.service.name=testDB)"/>
> >
> >
> >     </blueprint>
> >
> >     Le mar. 3 mars 2020 à 14:09, Xiangdong Huang <sa...@gmail.com> a
> > écrit :
> >
> >     > Hi Etienne,
> >     >
> >     > Can you share an example for integration Camel with some other DB
> > (NoSQL is
> >     > better)?
> >     > It will be helpful to let us evaluate how to integrate with IoTDB.
> >     >
> >     > Best,
> >     > ----------------------------------
> >     > Xiangdong Huang
> >     > School of Software, Tsinghua University
> >     >
> >     >  黄向东
> >     > 清华大学 软件学院
> >     >
> >     >
> >     > Jialin Qiao <qj...@mails.tsinghua.edu.cn> 于2020年3月3日周二 下午9:04写道:
> >     >
> >     > > Hi,
> >     > >
> >     > > If you only need a java api, the Session API is enough and better
> > than
> >     > > JDBC.
> >     > >
> >     > > There is an example about Session API:
> >     > >
> >     > >
> >     >
> >
> https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java
> >     > >
> >     > > I'm not familiar with Camel, but when integrating with rocketmq
> or
> > kafka,
> >     > > the consumer could use Session API to write data into IoTDB.
> >     > >
> >     > > Thanks,
> >     > > --
> >     > > Jialin Qiao
> >     > > School of Software, Tsinghua University
> >     > >
> >     > > 乔嘉林
> >     > > 清华大学 软件学院
> >     > >
> >     > > > -----原始邮件-----
> >     > > > 发件人: "Robinet, Etienne" <43...@etu.he2b.be>
> >     > > > 发送时间: 2020-03-03 20:55:43 (星期二)
> >     > > > 收件人: dev@iotdb.apache.org
> >     > > > 抄送:
> >     > > > 主题: Re: Prepared Statements/ Commit
> >     > > >
> >     > > > Hi,
> >     > > > Can I use this session API in combination with camel?
> >     > > >
> >     > > > Le mar. 3 mars 2020 à 13:54, Jialin Qiao <
> > qjl16@mails.tsinghua.edu.cn>
> >     > a
> >     > > > écrit :
> >     > > >
> >     > > > > Hi,
> >     > > > >
> >     > > > > PreparedStatement is not supported now. Instead, you could
> use
> >     > Session
> >     > > > > API, which also avoids the sql parser.
> >     > > > >
> >     > > > > Thanks,
> >     > > > > --
> >     > > > > Jialin Qiao
> >     > > > > School of Software, Tsinghua University
> >     > > > >
> >     > > > > 乔嘉林
> >     > > > > 清华大学 软件学院
> >     > > > >
> >     > > > > > -----原始邮件-----
> >     > > > > > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
> >     > > > > > 发送时间: 2020-03-03 20:35:56 (星期二)
> >     > > > > > 收件人: dev@iotdb.apache.org
> >     > > > > > 抄送:
> >     > > > > > 主题: Prepared Statements/ Commit
> >     > > > > >
> >     > > > > > Hi all,
> >     > > > > > could it be that IoTDB doesn't support prepared statements?
> > When I
> >     > > try
> >     > > > > to use the SQL component of Camel, this is the error I get:
> >     > > > > https://i.imgur.com/HOJgh0H.png
> >     > > > > >
> >     > > > > > when I use JDBC component I get an error message "Not
> support
> >     > > Commit". I
> >     > > > > am confused now on how to use camel with IoTDB.
> >     > > > > > Etienne
> >     > > > >
> >     > >
> >     >
> >
> >
> >
>

Re: Prepared Statements/ Commit

Posted by Julian Feinauer <j....@pragmaticminds.de>.
Yes, why not? This should not be too hard to do... Camels API is quite friendly.

What do you think?

Julian

Am 03.03.20, 15:25 schrieb "Robinet, Etienne" <43...@etu.he2b.be>:

    Hi Julian,
    you're thinking about creating a Camel component?
    
    Le mar. 3 mars 2020 à 15:24, Julian Feinauer <j....@pragmaticminds.de>
    a écrit :
    
    > Hi,
    >
    > another alternative would be to add a "native" IoTDB Integration like .e.g
    > we did in PLC4X. Its not that hard and should be easy for the IoTDB
    > community.
    >
    > What about that?
    >
    > Julian
    >
    > Am 03.03.20, 14:35 schrieb "Robinet, Etienne" <43...@etu.he2b.be>:
    >
    >     Hi,
    >     sadly I am pretty new at using camel and never worked with NoSQL DB
    > but I
    >     found this:
    >
    > https://rterp.wordpress.com/2014/07/25/writing-to-a-nosql-db-using-camel/
    >
    >      Also, here is a blueprint I used with Oracle DB:
    >     <?xml version="1.0" encoding="UTF-8"?>
    >     <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    >                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    >                xmlns:cm="
    >     http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
    >                xsi:schemaLocation="
    >              http://www.osgi.org/xmlns/blueprint/v1.0.0
    >     https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
    >              http://camel.apache.org/schema/blueprint
    >     http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
    >              http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
    >     http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">
    >
    >
    >     <camelContext id="TestContext" xmlns="
    >     http://camel.apache.org/schema/blueprint">
    >
    >     <route id="Route1">
    >
    >     <from uri="file://c:/test/in?delete=true"/>
    >     <setBody><simple>Route1 :: ${body}</simple></setBody>
    >           <to uri="sql:insert into test1_t(text)
    >     values(:#${body})?dataSource=my-db"/>
    >     </route>
    >
    >     </camelContext>
    >
    >
    >     <!-- The container provides a DataSource service connected to the
    > database
    >     -->
    >     <reference id="my-db" interface="javax.sql.DataSource" filter="(
    >     osgi.jndi.service.name=testDB)"/>
    >
    >
    >     </blueprint>
    >
    >     Le mar. 3 mars 2020 à 14:09, Xiangdong Huang <sa...@gmail.com> a
    > écrit :
    >
    >     > Hi Etienne,
    >     >
    >     > Can you share an example for integration Camel with some other DB
    > (NoSQL is
    >     > better)?
    >     > It will be helpful to let us evaluate how to integrate with IoTDB.
    >     >
    >     > Best,
    >     > ----------------------------------
    >     > Xiangdong Huang
    >     > School of Software, Tsinghua University
    >     >
    >     >  黄向东
    >     > 清华大学 软件学院
    >     >
    >     >
    >     > Jialin Qiao <qj...@mails.tsinghua.edu.cn> 于2020年3月3日周二 下午9:04写道:
    >     >
    >     > > Hi,
    >     > >
    >     > > If you only need a java api, the Session API is enough and better
    > than
    >     > > JDBC.
    >     > >
    >     > > There is an example about Session API:
    >     > >
    >     > >
    >     >
    > https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java
    >     > >
    >     > > I'm not familiar with Camel, but when integrating with rocketmq or
    > kafka,
    >     > > the consumer could use Session API to write data into IoTDB.
    >     > >
    >     > > Thanks,
    >     > > --
    >     > > Jialin Qiao
    >     > > School of Software, Tsinghua University
    >     > >
    >     > > 乔嘉林
    >     > > 清华大学 软件学院
    >     > >
    >     > > > -----原始邮件-----
    >     > > > 发件人: "Robinet, Etienne" <43...@etu.he2b.be>
    >     > > > 发送时间: 2020-03-03 20:55:43 (星期二)
    >     > > > 收件人: dev@iotdb.apache.org
    >     > > > 抄送:
    >     > > > 主题: Re: Prepared Statements/ Commit
    >     > > >
    >     > > > Hi,
    >     > > > Can I use this session API in combination with camel?
    >     > > >
    >     > > > Le mar. 3 mars 2020 à 13:54, Jialin Qiao <
    > qjl16@mails.tsinghua.edu.cn>
    >     > a
    >     > > > écrit :
    >     > > >
    >     > > > > Hi,
    >     > > > >
    >     > > > > PreparedStatement is not supported now. Instead, you could use
    >     > Session
    >     > > > > API, which also avoids the sql parser.
    >     > > > >
    >     > > > > Thanks,
    >     > > > > --
    >     > > > > Jialin Qiao
    >     > > > > School of Software, Tsinghua University
    >     > > > >
    >     > > > > 乔嘉林
    >     > > > > 清华大学 软件学院
    >     > > > >
    >     > > > > > -----原始邮件-----
    >     > > > > > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
    >     > > > > > 发送时间: 2020-03-03 20:35:56 (星期二)
    >     > > > > > 收件人: dev@iotdb.apache.org
    >     > > > > > 抄送:
    >     > > > > > 主题: Prepared Statements/ Commit
    >     > > > > >
    >     > > > > > Hi all,
    >     > > > > > could it be that IoTDB doesn't support prepared statements?
    > When I
    >     > > try
    >     > > > > to use the SQL component of Camel, this is the error I get:
    >     > > > > https://i.imgur.com/HOJgh0H.png
    >     > > > > >
    >     > > > > > when I use JDBC component I get an error message "Not support
    >     > > Commit". I
    >     > > > > am confused now on how to use camel with IoTDB.
    >     > > > > > Etienne
    >     > > > >
    >     > >
    >     >
    >
    >
    >
    


Re: Prepared Statements/ Commit

Posted by Julian Feinauer <j....@pragmaticminds.de>.
Hey Willem,

this is a good idea... probably it even makes sense to use Apache Avatica for a full featured JDBC Driver?

Julian

Am 03.03.20, 15:51 schrieb "Willem Jiang" <wi...@gmail.com>:

    It's not difficult to build a component of IoTDB for Camel with Session API。
    But it's could be great if the IoTDB provide standard support the
    JDBC, as we may hit another issue of JDBC support.
    Is it possible that IoTDB implements the getParameterMetaData method this time?
    
    Willem Jiang
    
    Twitter: willemjiang
    Weibo: 姜宁willem
    
    On Tue, Mar 3, 2020 at 10:25 PM Robinet, Etienne <43...@etu.he2b.be> wrote:
    >
    > Hi Julian,
    > you're thinking about creating a Camel component?
    >
    > Le mar. 3 mars 2020 à 15:24, Julian Feinauer <j....@pragmaticminds.de>
    > a écrit :
    >
    > > Hi,
    > >
    > > another alternative would be to add a "native" IoTDB Integration like .e.g
    > > we did in PLC4X. Its not that hard and should be easy for the IoTDB
    > > community.
    > >
    > > What about that?
    > >
    > > Julian
    > >
    > > Am 03.03.20, 14:35 schrieb "Robinet, Etienne" <43...@etu.he2b.be>:
    > >
    > >     Hi,
    > >     sadly I am pretty new at using camel and never worked with NoSQL DB
    > > but I
    > >     found this:
    > >
    > > https://rterp.wordpress.com/2014/07/25/writing-to-a-nosql-db-using-camel/
    > >
    > >      Also, here is a blueprint I used with Oracle DB:
    > >     <?xml version="1.0" encoding="UTF-8"?>
    > >     <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    > >                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > >                xmlns:cm="
    > >     http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
    > >                xsi:schemaLocation="
    > >              http://www.osgi.org/xmlns/blueprint/v1.0.0
    > >     https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
    > >              http://camel.apache.org/schema/blueprint
    > >     http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
    > >              http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
    > >     http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">
    > >
    > >
    > >     <camelContext id="TestContext" xmlns="
    > >     http://camel.apache.org/schema/blueprint">
    > >
    > >     <route id="Route1">
    > >
    > >     <from uri="file://c:/test/in?delete=true"/>
    > >     <setBody><simple>Route1 :: ${body}</simple></setBody>
    > >           <to uri="sql:insert into test1_t(text)
    > >     values(:#${body})?dataSource=my-db"/>
    > >     </route>
    > >
    > >     </camelContext>
    > >
    > >
    > >     <!-- The container provides a DataSource service connected to the
    > > database
    > >     -->
    > >     <reference id="my-db" interface="javax.sql.DataSource" filter="(
    > >     osgi.jndi.service.name=testDB)"/>
    > >
    > >
    > >     </blueprint>
    > >
    > >     Le mar. 3 mars 2020 à 14:09, Xiangdong Huang <sa...@gmail.com> a
    > > écrit :
    > >
    > >     > Hi Etienne,
    > >     >
    > >     > Can you share an example for integration Camel with some other DB
    > > (NoSQL is
    > >     > better)?
    > >     > It will be helpful to let us evaluate how to integrate with IoTDB.
    > >     >
    > >     > Best,
    > >     > ----------------------------------
    > >     > Xiangdong Huang
    > >     > School of Software, Tsinghua University
    > >     >
    > >     >  黄向东
    > >     > 清华大学 软件学院
    > >     >
    > >     >
    > >     > Jialin Qiao <qj...@mails.tsinghua.edu.cn> 于2020年3月3日周二 下午9:04写道:
    > >     >
    > >     > > Hi,
    > >     > >
    > >     > > If you only need a java api, the Session API is enough and better
    > > than
    > >     > > JDBC.
    > >     > >
    > >     > > There is an example about Session API:
    > >     > >
    > >     > >
    > >     >
    > > https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java
    > >     > >
    > >     > > I'm not familiar with Camel, but when integrating with rocketmq or
    > > kafka,
    > >     > > the consumer could use Session API to write data into IoTDB.
    > >     > >
    > >     > > Thanks,
    > >     > > --
    > >     > > Jialin Qiao
    > >     > > School of Software, Tsinghua University
    > >     > >
    > >     > > 乔嘉林
    > >     > > 清华大学 软件学院
    > >     > >
    > >     > > > -----原始邮件-----
    > >     > > > 发件人: "Robinet, Etienne" <43...@etu.he2b.be>
    > >     > > > 发送时间: 2020-03-03 20:55:43 (星期二)
    > >     > > > 收件人: dev@iotdb.apache.org
    > >     > > > 抄送:
    > >     > > > 主题: Re: Prepared Statements/ Commit
    > >     > > >
    > >     > > > Hi,
    > >     > > > Can I use this session API in combination with camel?
    > >     > > >
    > >     > > > Le mar. 3 mars 2020 à 13:54, Jialin Qiao <
    > > qjl16@mails.tsinghua.edu.cn>
    > >     > a
    > >     > > > écrit :
    > >     > > >
    > >     > > > > Hi,
    > >     > > > >
    > >     > > > > PreparedStatement is not supported now. Instead, you could use
    > >     > Session
    > >     > > > > API, which also avoids the sql parser.
    > >     > > > >
    > >     > > > > Thanks,
    > >     > > > > --
    > >     > > > > Jialin Qiao
    > >     > > > > School of Software, Tsinghua University
    > >     > > > >
    > >     > > > > 乔嘉林
    > >     > > > > 清华大学 软件学院
    > >     > > > >
    > >     > > > > > -----原始邮件-----
    > >     > > > > > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
    > >     > > > > > 发送时间: 2020-03-03 20:35:56 (星期二)
    > >     > > > > > 收件人: dev@iotdb.apache.org
    > >     > > > > > 抄送:
    > >     > > > > > 主题: Prepared Statements/ Commit
    > >     > > > > >
    > >     > > > > > Hi all,
    > >     > > > > > could it be that IoTDB doesn't support prepared statements?
    > > When I
    > >     > > try
    > >     > > > > to use the SQL component of Camel, this is the error I get:
    > >     > > > > https://i.imgur.com/HOJgh0H.png
    > >     > > > > >
    > >     > > > > > when I use JDBC component I get an error message "Not support
    > >     > > Commit". I
    > >     > > > > am confused now on how to use camel with IoTDB.
    > >     > > > > > Etienne
    > >     > > > >
    > >     > >
    > >     >
    > >
    > >
    > >
    


Re: Prepared Statements/ Commit

Posted by Willem Jiang <wi...@gmail.com>.
It's not difficult to build a component of IoTDB for Camel with Session API。
But it's could be great if the IoTDB provide standard support the
JDBC, as we may hit another issue of JDBC support.
Is it possible that IoTDB implements the getParameterMetaData method this time?

Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Tue, Mar 3, 2020 at 10:25 PM Robinet, Etienne <43...@etu.he2b.be> wrote:
>
> Hi Julian,
> you're thinking about creating a Camel component?
>
> Le mar. 3 mars 2020 à 15:24, Julian Feinauer <j....@pragmaticminds.de>
> a écrit :
>
> > Hi,
> >
> > another alternative would be to add a "native" IoTDB Integration like .e.g
> > we did in PLC4X. Its not that hard and should be easy for the IoTDB
> > community.
> >
> > What about that?
> >
> > Julian
> >
> > Am 03.03.20, 14:35 schrieb "Robinet, Etienne" <43...@etu.he2b.be>:
> >
> >     Hi,
> >     sadly I am pretty new at using camel and never worked with NoSQL DB
> > but I
> >     found this:
> >
> > https://rterp.wordpress.com/2014/07/25/writing-to-a-nosql-db-using-camel/
> >
> >      Also, here is a blueprint I used with Oracle DB:
> >     <?xml version="1.0" encoding="UTF-8"?>
> >     <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> >                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >                xmlns:cm="
> >     http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
> >                xsi:schemaLocation="
> >              http://www.osgi.org/xmlns/blueprint/v1.0.0
> >     https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> >              http://camel.apache.org/schema/blueprint
> >     http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
> >              http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
> >     http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">
> >
> >
> >     <camelContext id="TestContext" xmlns="
> >     http://camel.apache.org/schema/blueprint">
> >
> >     <route id="Route1">
> >
> >     <from uri="file://c:/test/in?delete=true"/>
> >     <setBody><simple>Route1 :: ${body}</simple></setBody>
> >           <to uri="sql:insert into test1_t(text)
> >     values(:#${body})?dataSource=my-db"/>
> >     </route>
> >
> >     </camelContext>
> >
> >
> >     <!-- The container provides a DataSource service connected to the
> > database
> >     -->
> >     <reference id="my-db" interface="javax.sql.DataSource" filter="(
> >     osgi.jndi.service.name=testDB)"/>
> >
> >
> >     </blueprint>
> >
> >     Le mar. 3 mars 2020 à 14:09, Xiangdong Huang <sa...@gmail.com> a
> > écrit :
> >
> >     > Hi Etienne,
> >     >
> >     > Can you share an example for integration Camel with some other DB
> > (NoSQL is
> >     > better)?
> >     > It will be helpful to let us evaluate how to integrate with IoTDB.
> >     >
> >     > Best,
> >     > ----------------------------------
> >     > Xiangdong Huang
> >     > School of Software, Tsinghua University
> >     >
> >     >  黄向东
> >     > 清华大学 软件学院
> >     >
> >     >
> >     > Jialin Qiao <qj...@mails.tsinghua.edu.cn> 于2020年3月3日周二 下午9:04写道:
> >     >
> >     > > Hi,
> >     > >
> >     > > If you only need a java api, the Session API is enough and better
> > than
> >     > > JDBC.
> >     > >
> >     > > There is an example about Session API:
> >     > >
> >     > >
> >     >
> > https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java
> >     > >
> >     > > I'm not familiar with Camel, but when integrating with rocketmq or
> > kafka,
> >     > > the consumer could use Session API to write data into IoTDB.
> >     > >
> >     > > Thanks,
> >     > > --
> >     > > Jialin Qiao
> >     > > School of Software, Tsinghua University
> >     > >
> >     > > 乔嘉林
> >     > > 清华大学 软件学院
> >     > >
> >     > > > -----原始邮件-----
> >     > > > 发件人: "Robinet, Etienne" <43...@etu.he2b.be>
> >     > > > 发送时间: 2020-03-03 20:55:43 (星期二)
> >     > > > 收件人: dev@iotdb.apache.org
> >     > > > 抄送:
> >     > > > 主题: Re: Prepared Statements/ Commit
> >     > > >
> >     > > > Hi,
> >     > > > Can I use this session API in combination with camel?
> >     > > >
> >     > > > Le mar. 3 mars 2020 à 13:54, Jialin Qiao <
> > qjl16@mails.tsinghua.edu.cn>
> >     > a
> >     > > > écrit :
> >     > > >
> >     > > > > Hi,
> >     > > > >
> >     > > > > PreparedStatement is not supported now. Instead, you could use
> >     > Session
> >     > > > > API, which also avoids the sql parser.
> >     > > > >
> >     > > > > Thanks,
> >     > > > > --
> >     > > > > Jialin Qiao
> >     > > > > School of Software, Tsinghua University
> >     > > > >
> >     > > > > 乔嘉林
> >     > > > > 清华大学 软件学院
> >     > > > >
> >     > > > > > -----原始邮件-----
> >     > > > > > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
> >     > > > > > 发送时间: 2020-03-03 20:35:56 (星期二)
> >     > > > > > 收件人: dev@iotdb.apache.org
> >     > > > > > 抄送:
> >     > > > > > 主题: Prepared Statements/ Commit
> >     > > > > >
> >     > > > > > Hi all,
> >     > > > > > could it be that IoTDB doesn't support prepared statements?
> > When I
> >     > > try
> >     > > > > to use the SQL component of Camel, this is the error I get:
> >     > > > > https://i.imgur.com/HOJgh0H.png
> >     > > > > >
> >     > > > > > when I use JDBC component I get an error message "Not support
> >     > > Commit". I
> >     > > > > am confused now on how to use camel with IoTDB.
> >     > > > > > Etienne
> >     > > > >
> >     > >
> >     >
> >
> >
> >

Re: Prepared Statements/ Commit

Posted by "Robinet, Etienne" <43...@etu.he2b.be>.
Hi Julian,
you're thinking about creating a Camel component?

Le mar. 3 mars 2020 à 15:24, Julian Feinauer <j....@pragmaticminds.de>
a écrit :

> Hi,
>
> another alternative would be to add a "native" IoTDB Integration like .e.g
> we did in PLC4X. Its not that hard and should be easy for the IoTDB
> community.
>
> What about that?
>
> Julian
>
> Am 03.03.20, 14:35 schrieb "Robinet, Etienne" <43...@etu.he2b.be>:
>
>     Hi,
>     sadly I am pretty new at using camel and never worked with NoSQL DB
> but I
>     found this:
>
> https://rterp.wordpress.com/2014/07/25/writing-to-a-nosql-db-using-camel/
>
>      Also, here is a blueprint I used with Oracle DB:
>     <?xml version="1.0" encoding="UTF-8"?>
>     <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                xmlns:cm="
>     http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
>                xsi:schemaLocation="
>              http://www.osgi.org/xmlns/blueprint/v1.0.0
>     https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
>              http://camel.apache.org/schema/blueprint
>     http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
>              http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
>     http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">
>
>
>     <camelContext id="TestContext" xmlns="
>     http://camel.apache.org/schema/blueprint">
>
>     <route id="Route1">
>
>     <from uri="file://c:/test/in?delete=true"/>
>     <setBody><simple>Route1 :: ${body}</simple></setBody>
>           <to uri="sql:insert into test1_t(text)
>     values(:#${body})?dataSource=my-db"/>
>     </route>
>
>     </camelContext>
>
>
>     <!-- The container provides a DataSource service connected to the
> database
>     -->
>     <reference id="my-db" interface="javax.sql.DataSource" filter="(
>     osgi.jndi.service.name=testDB)"/>
>
>
>     </blueprint>
>
>     Le mar. 3 mars 2020 à 14:09, Xiangdong Huang <sa...@gmail.com> a
> écrit :
>
>     > Hi Etienne,
>     >
>     > Can you share an example for integration Camel with some other DB
> (NoSQL is
>     > better)?
>     > It will be helpful to let us evaluate how to integrate with IoTDB.
>     >
>     > Best,
>     > ----------------------------------
>     > Xiangdong Huang
>     > School of Software, Tsinghua University
>     >
>     >  黄向东
>     > 清华大学 软件学院
>     >
>     >
>     > Jialin Qiao <qj...@mails.tsinghua.edu.cn> 于2020年3月3日周二 下午9:04写道:
>     >
>     > > Hi,
>     > >
>     > > If you only need a java api, the Session API is enough and better
> than
>     > > JDBC.
>     > >
>     > > There is an example about Session API:
>     > >
>     > >
>     >
> https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java
>     > >
>     > > I'm not familiar with Camel, but when integrating with rocketmq or
> kafka,
>     > > the consumer could use Session API to write data into IoTDB.
>     > >
>     > > Thanks,
>     > > --
>     > > Jialin Qiao
>     > > School of Software, Tsinghua University
>     > >
>     > > 乔嘉林
>     > > 清华大学 软件学院
>     > >
>     > > > -----原始邮件-----
>     > > > 发件人: "Robinet, Etienne" <43...@etu.he2b.be>
>     > > > 发送时间: 2020-03-03 20:55:43 (星期二)
>     > > > 收件人: dev@iotdb.apache.org
>     > > > 抄送:
>     > > > 主题: Re: Prepared Statements/ Commit
>     > > >
>     > > > Hi,
>     > > > Can I use this session API in combination with camel?
>     > > >
>     > > > Le mar. 3 mars 2020 à 13:54, Jialin Qiao <
> qjl16@mails.tsinghua.edu.cn>
>     > a
>     > > > écrit :
>     > > >
>     > > > > Hi,
>     > > > >
>     > > > > PreparedStatement is not supported now. Instead, you could use
>     > Session
>     > > > > API, which also avoids the sql parser.
>     > > > >
>     > > > > Thanks,
>     > > > > --
>     > > > > Jialin Qiao
>     > > > > School of Software, Tsinghua University
>     > > > >
>     > > > > 乔嘉林
>     > > > > 清华大学 软件学院
>     > > > >
>     > > > > > -----原始邮件-----
>     > > > > > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
>     > > > > > 发送时间: 2020-03-03 20:35:56 (星期二)
>     > > > > > 收件人: dev@iotdb.apache.org
>     > > > > > 抄送:
>     > > > > > 主题: Prepared Statements/ Commit
>     > > > > >
>     > > > > > Hi all,
>     > > > > > could it be that IoTDB doesn't support prepared statements?
> When I
>     > > try
>     > > > > to use the SQL component of Camel, this is the error I get:
>     > > > > https://i.imgur.com/HOJgh0H.png
>     > > > > >
>     > > > > > when I use JDBC component I get an error message "Not support
>     > > Commit". I
>     > > > > am confused now on how to use camel with IoTDB.
>     > > > > > Etienne
>     > > > >
>     > >
>     >
>
>
>

Re: Prepared Statements/ Commit

Posted by Julian Feinauer <j....@pragmaticminds.de>.
Hi,

another alternative would be to add a "native" IoTDB Integration like .e.g we did in PLC4X. Its not that hard and should be easy for the IoTDB community.

What about that?

Julian

Am 03.03.20, 14:35 schrieb "Robinet, Etienne" <43...@etu.he2b.be>:

    Hi,
    sadly I am pretty new at using camel and never worked with NoSQL DB but I
    found this:
    https://rterp.wordpress.com/2014/07/25/writing-to-a-nosql-db-using-camel/
    
     Also, here is a blueprint I used with Oracle DB:
    <?xml version="1.0" encoding="UTF-8"?>
    <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:cm="
    http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
               xsi:schemaLocation="
             http://www.osgi.org/xmlns/blueprint/v1.0.0
    https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
             http://camel.apache.org/schema/blueprint
    http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
    http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">
    
    
    <camelContext id="TestContext" xmlns="
    http://camel.apache.org/schema/blueprint">
    
    <route id="Route1">
    
    <from uri="file://c:/test/in?delete=true"/>
    <setBody><simple>Route1 :: ${body}</simple></setBody>
          <to uri="sql:insert into test1_t(text)
    values(:#${body})?dataSource=my-db"/>
    </route>
    
    </camelContext>
    
    
    <!-- The container provides a DataSource service connected to the database
    -->
    <reference id="my-db" interface="javax.sql.DataSource" filter="(
    osgi.jndi.service.name=testDB)"/>
    
    
    </blueprint>
    
    Le mar. 3 mars 2020 à 14:09, Xiangdong Huang <sa...@gmail.com> a écrit :
    
    > Hi Etienne,
    >
    > Can you share an example for integration Camel with some other DB (NoSQL is
    > better)?
    > It will be helpful to let us evaluate how to integrate with IoTDB.
    >
    > Best,
    > ----------------------------------
    > Xiangdong Huang
    > School of Software, Tsinghua University
    >
    >  黄向东
    > 清华大学 软件学院
    >
    >
    > Jialin Qiao <qj...@mails.tsinghua.edu.cn> 于2020年3月3日周二 下午9:04写道:
    >
    > > Hi,
    > >
    > > If you only need a java api, the Session API is enough and better than
    > > JDBC.
    > >
    > > There is an example about Session API:
    > >
    > >
    > https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java
    > >
    > > I'm not familiar with Camel, but when integrating with rocketmq or kafka,
    > > the consumer could use Session API to write data into IoTDB.
    > >
    > > Thanks,
    > > --
    > > Jialin Qiao
    > > School of Software, Tsinghua University
    > >
    > > 乔嘉林
    > > 清华大学 软件学院
    > >
    > > > -----原始邮件-----
    > > > 发件人: "Robinet, Etienne" <43...@etu.he2b.be>
    > > > 发送时间: 2020-03-03 20:55:43 (星期二)
    > > > 收件人: dev@iotdb.apache.org
    > > > 抄送:
    > > > 主题: Re: Prepared Statements/ Commit
    > > >
    > > > Hi,
    > > > Can I use this session API in combination with camel?
    > > >
    > > > Le mar. 3 mars 2020 à 13:54, Jialin Qiao <qj...@mails.tsinghua.edu.cn>
    > a
    > > > écrit :
    > > >
    > > > > Hi,
    > > > >
    > > > > PreparedStatement is not supported now. Instead, you could use
    > Session
    > > > > API, which also avoids the sql parser.
    > > > >
    > > > > Thanks,
    > > > > --
    > > > > Jialin Qiao
    > > > > School of Software, Tsinghua University
    > > > >
    > > > > 乔嘉林
    > > > > 清华大学 软件学院
    > > > >
    > > > > > -----原始邮件-----
    > > > > > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
    > > > > > 发送时间: 2020-03-03 20:35:56 (星期二)
    > > > > > 收件人: dev@iotdb.apache.org
    > > > > > 抄送:
    > > > > > 主题: Prepared Statements/ Commit
    > > > > >
    > > > > > Hi all,
    > > > > > could it be that IoTDB doesn't support prepared statements? When I
    > > try
    > > > > to use the SQL component of Camel, this is the error I get:
    > > > > https://i.imgur.com/HOJgh0H.png
    > > > > >
    > > > > > when I use JDBC component I get an error message "Not support
    > > Commit". I
    > > > > am confused now on how to use camel with IoTDB.
    > > > > > Etienne
    > > > >
    > >
    >
    


Re: Prepared Statements/ Commit

Posted by "Robinet, Etienne" <43...@etu.he2b.be>.
Hi,
sadly I am pretty new at using camel and never worked with NoSQL DB but I
found this:
https://rterp.wordpress.com/2014/07/25/writing-to-a-nosql-db-using-camel/

 Also, here is a blueprint I used with Oracle DB:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:cm="
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
           xsi:schemaLocation="
         http://www.osgi.org/xmlns/blueprint/v1.0.0
https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
         http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
         http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">


<camelContext id="TestContext" xmlns="
http://camel.apache.org/schema/blueprint">

<route id="Route1">

<from uri="file://c:/test/in?delete=true"/>
<setBody><simple>Route1 :: ${body}</simple></setBody>
      <to uri="sql:insert into test1_t(text)
values(:#${body})?dataSource=my-db"/>
</route>

</camelContext>


<!-- The container provides a DataSource service connected to the database
-->
<reference id="my-db" interface="javax.sql.DataSource" filter="(
osgi.jndi.service.name=testDB)"/>


</blueprint>

Le mar. 3 mars 2020 à 14:09, Xiangdong Huang <sa...@gmail.com> a écrit :

> Hi Etienne,
>
> Can you share an example for integration Camel with some other DB (NoSQL is
> better)?
> It will be helpful to let us evaluate how to integrate with IoTDB.
>
> Best,
> ----------------------------------
> Xiangdong Huang
> School of Software, Tsinghua University
>
>  黄向东
> 清华大学 软件学院
>
>
> Jialin Qiao <qj...@mails.tsinghua.edu.cn> 于2020年3月3日周二 下午9:04写道:
>
> > Hi,
> >
> > If you only need a java api, the Session API is enough and better than
> > JDBC.
> >
> > There is an example about Session API:
> >
> >
> https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java
> >
> > I'm not familiar with Camel, but when integrating with rocketmq or kafka,
> > the consumer could use Session API to write data into IoTDB.
> >
> > Thanks,
> > --
> > Jialin Qiao
> > School of Software, Tsinghua University
> >
> > 乔嘉林
> > 清华大学 软件学院
> >
> > > -----原始邮件-----
> > > 发件人: "Robinet, Etienne" <43...@etu.he2b.be>
> > > 发送时间: 2020-03-03 20:55:43 (星期二)
> > > 收件人: dev@iotdb.apache.org
> > > 抄送:
> > > 主题: Re: Prepared Statements/ Commit
> > >
> > > Hi,
> > > Can I use this session API in combination with camel?
> > >
> > > Le mar. 3 mars 2020 à 13:54, Jialin Qiao <qj...@mails.tsinghua.edu.cn>
> a
> > > écrit :
> > >
> > > > Hi,
> > > >
> > > > PreparedStatement is not supported now. Instead, you could use
> Session
> > > > API, which also avoids the sql parser.
> > > >
> > > > Thanks,
> > > > --
> > > > Jialin Qiao
> > > > School of Software, Tsinghua University
> > > >
> > > > 乔嘉林
> > > > 清华大学 软件学院
> > > >
> > > > > -----原始邮件-----
> > > > > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
> > > > > 发送时间: 2020-03-03 20:35:56 (星期二)
> > > > > 收件人: dev@iotdb.apache.org
> > > > > 抄送:
> > > > > 主题: Prepared Statements/ Commit
> > > > >
> > > > > Hi all,
> > > > > could it be that IoTDB doesn't support prepared statements? When I
> > try
> > > > to use the SQL component of Camel, this is the error I get:
> > > > https://i.imgur.com/HOJgh0H.png
> > > > >
> > > > > when I use JDBC component I get an error message "Not support
> > Commit". I
> > > > am confused now on how to use camel with IoTDB.
> > > > > Etienne
> > > >
> >
>

Re: Prepared Statements/ Commit

Posted by Xiangdong Huang <sa...@gmail.com>.
Hi Etienne,

Can you share an example for integration Camel with some other DB (NoSQL is
better)?
It will be helpful to let us evaluate how to integrate with IoTDB.

Best,
----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

 黄向东
清华大学 软件学院


Jialin Qiao <qj...@mails.tsinghua.edu.cn> 于2020年3月3日周二 下午9:04写道:

> Hi,
>
> If you only need a java api, the Session API is enough and better than
> JDBC.
>
> There is an example about Session API:
>
> https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java
>
> I'm not familiar with Camel, but when integrating with rocketmq or kafka,
> the consumer could use Session API to write data into IoTDB.
>
> Thanks,
> --
> Jialin Qiao
> School of Software, Tsinghua University
>
> 乔嘉林
> 清华大学 软件学院
>
> > -----原始邮件-----
> > 发件人: "Robinet, Etienne" <43...@etu.he2b.be>
> > 发送时间: 2020-03-03 20:55:43 (星期二)
> > 收件人: dev@iotdb.apache.org
> > 抄送:
> > 主题: Re: Prepared Statements/ Commit
> >
> > Hi,
> > Can I use this session API in combination with camel?
> >
> > Le mar. 3 mars 2020 à 13:54, Jialin Qiao <qj...@mails.tsinghua.edu.cn> a
> > écrit :
> >
> > > Hi,
> > >
> > > PreparedStatement is not supported now. Instead, you could use Session
> > > API, which also avoids the sql parser.
> > >
> > > Thanks,
> > > --
> > > Jialin Qiao
> > > School of Software, Tsinghua University
> > >
> > > 乔嘉林
> > > 清华大学 软件学院
> > >
> > > > -----原始邮件-----
> > > > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
> > > > 发送时间: 2020-03-03 20:35:56 (星期二)
> > > > 收件人: dev@iotdb.apache.org
> > > > 抄送:
> > > > 主题: Prepared Statements/ Commit
> > > >
> > > > Hi all,
> > > > could it be that IoTDB doesn't support prepared statements? When I
> try
> > > to use the SQL component of Camel, this is the error I get:
> > > https://i.imgur.com/HOJgh0H.png
> > > >
> > > > when I use JDBC component I get an error message "Not support
> Commit". I
> > > am confused now on how to use camel with IoTDB.
> > > > Etienne
> > >
>

Re: Prepared Statements/ Commit

Posted by "Robinet, Etienne" <43...@etu.he2b.be>.
Hi,
Okay I will look into this. But my goal was to use existing JDBC/SQL
component of Camel to communicate with IoTDB.
Regards,

Etienne

Le mar. 3 mars 2020 à 14:04, Jialin Qiao <qj...@mails.tsinghua.edu.cn> a
écrit :

> Hi,
>
> If you only need a java api, the Session API is enough and better than
> JDBC.
>
> There is an example about Session API:
>
> https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java
>
> I'm not familiar with Camel, but when integrating with rocketmq or kafka,
> the consumer could use Session API to write data into IoTDB.
>
> Thanks,
> --
> Jialin Qiao
> School of Software, Tsinghua University
>
> 乔嘉林
> 清华大学 软件学院
>
> > -----原始邮件-----
> > 发件人: "Robinet, Etienne" <43...@etu.he2b.be>
> > 发送时间: 2020-03-03 20:55:43 (星期二)
> > 收件人: dev@iotdb.apache.org
> > 抄送:
> > 主题: Re: Prepared Statements/ Commit
> >
> > Hi,
> > Can I use this session API in combination with camel?
> >
> > Le mar. 3 mars 2020 à 13:54, Jialin Qiao <qj...@mails.tsinghua.edu.cn> a
> > écrit :
> >
> > > Hi,
> > >
> > > PreparedStatement is not supported now. Instead, you could use Session
> > > API, which also avoids the sql parser.
> > >
> > > Thanks,
> > > --
> > > Jialin Qiao
> > > School of Software, Tsinghua University
> > >
> > > 乔嘉林
> > > 清华大学 软件学院
> > >
> > > > -----原始邮件-----
> > > > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
> > > > 发送时间: 2020-03-03 20:35:56 (星期二)
> > > > 收件人: dev@iotdb.apache.org
> > > > 抄送:
> > > > 主题: Prepared Statements/ Commit
> > > >
> > > > Hi all,
> > > > could it be that IoTDB doesn't support prepared statements? When I
> try
> > > to use the SQL component of Camel, this is the error I get:
> > > https://i.imgur.com/HOJgh0H.png
> > > >
> > > > when I use JDBC component I get an error message "Not support
> Commit". I
> > > am confused now on how to use camel with IoTDB.
> > > > Etienne
> > >
>

Re: Prepared Statements/ Commit

Posted by Jialin Qiao <qj...@mails.tsinghua.edu.cn>.
Hi,

If you only need a java api, the Session API is enough and better than JDBC.

There is an example about Session API: 
https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java

I'm not familiar with Camel, but when integrating with rocketmq or kafka, the consumer could use Session API to write data into IoTDB.

Thanks,
--
Jialin Qiao
School of Software, Tsinghua University

乔嘉林
清华大学 软件学院

> -----原始邮件-----
> 发件人: "Robinet, Etienne" <43...@etu.he2b.be>
> 发送时间: 2020-03-03 20:55:43 (星期二)
> 收件人: dev@iotdb.apache.org
> 抄送: 
> 主题: Re: Prepared Statements/ Commit
> 
> Hi,
> Can I use this session API in combination with camel?
> 
> Le mar. 3 mars 2020 à 13:54, Jialin Qiao <qj...@mails.tsinghua.edu.cn> a
> écrit :
> 
> > Hi,
> >
> > PreparedStatement is not supported now. Instead, you could use Session
> > API, which also avoids the sql parser.
> >
> > Thanks,
> > --
> > Jialin Qiao
> > School of Software, Tsinghua University
> >
> > 乔嘉林
> > 清华大学 软件学院
> >
> > > -----原始邮件-----
> > > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
> > > 发送时间: 2020-03-03 20:35:56 (星期二)
> > > 收件人: dev@iotdb.apache.org
> > > 抄送:
> > > 主题: Prepared Statements/ Commit
> > >
> > > Hi all,
> > > could it be that IoTDB doesn't support prepared statements? When I try
> > to use the SQL component of Camel, this is the error I get:
> > https://i.imgur.com/HOJgh0H.png
> > >
> > > when I use JDBC component I get an error message "Not support Commit". I
> > am confused now on how to use camel with IoTDB.
> > > Etienne
> >

Re: Prepared Statements/ Commit

Posted by "Robinet, Etienne" <43...@etu.he2b.be>.
Hi,
Can I use this session API in combination with camel?

Le mar. 3 mars 2020 à 13:54, Jialin Qiao <qj...@mails.tsinghua.edu.cn> a
écrit :

> Hi,
>
> PreparedStatement is not supported now. Instead, you could use Session
> API, which also avoids the sql parser.
>
> Thanks,
> --
> Jialin Qiao
> School of Software, Tsinghua University
>
> 乔嘉林
> 清华大学 软件学院
>
> > -----原始邮件-----
> > 发件人: "Etienne Robinet" <43...@etu.he2b.be>
> > 发送时间: 2020-03-03 20:35:56 (星期二)
> > 收件人: dev@iotdb.apache.org
> > 抄送:
> > 主题: Prepared Statements/ Commit
> >
> > Hi all,
> > could it be that IoTDB doesn't support prepared statements? When I try
> to use the SQL component of Camel, this is the error I get:
> https://i.imgur.com/HOJgh0H.png
> >
> > when I use JDBC component I get an error message "Not support Commit". I
> am confused now on how to use camel with IoTDB.
> > Etienne
>

Re: Prepared Statements/ Commit

Posted by Jialin Qiao <qj...@mails.tsinghua.edu.cn>.
Hi,

PreparedStatement is not supported now. Instead, you could use Session API, which also avoids the sql parser.

Thanks,
--
Jialin Qiao
School of Software, Tsinghua University

乔嘉林
清华大学 软件学院

> -----原始邮件-----
> 发件人: "Etienne Robinet" <43...@etu.he2b.be>
> 发送时间: 2020-03-03 20:35:56 (星期二)
> 收件人: dev@iotdb.apache.org
> 抄送: 
> 主题: Prepared Statements/ Commit
> 
> Hi all,
> could it be that IoTDB doesn't support prepared statements? When I try to use the SQL component of Camel, this is the error I get:https://i.imgur.com/HOJgh0H.png
> 
> when I use JDBC component I get an error message "Not support Commit". I am confused now on how to use camel with IoTDB.
> Etienne