Hi all,

I just made a quick test and as aspected it is not compatible with the
IoT-DB anymore. So what are the best options?
 
I would say, move each working JDBClient into the depending Sink folder
and rename it like IoTDbClient and PostgresClient. Similar solution is
used for example in the InfluxDbClient sink folder.

What do you think?

Kind regards
Florian



Am Freitag, den 15.05.2020, 15:29 +0200 schrieb Florian Micklich:
> Hi all,
> 
> I did some changes in the postgres sink and depending
> JdbcClient.class.
> 
> 
> Here is the small changelog:
> 
>    A. I improved the error messages if wrong host/port oder user
>       authentication is used.
>    B. Changing the  enum SqlAttribute data types for Double and
> String. In
>       Postgres double leads to an error described in STREAMPIPES-127.
>       Instead DOUBLE PRECISION has to be used [1]. Also changes
> String
>       from varchar255 to TEXT. This allows "unlimited" string lentgh.
>    C. Added two new db settings: 
>        * Use schema name [2] instead of only public. 
>        * Drop Table if Exists Option. This deletes the table if table
> exists, so old will be removed and the same table name can be used.
>    D. Because of C. some changes had to be made in the
> JdbcClient.class
>       and also in the initializeJdbc method with two new parameters.
>    E. Extended documentation and string.en with the new parameters
> 
> This changes can be found in the feature/postgis-sink branch. The
> compatibility with the IoT-DB, which also uses the class
> JdbcClient.class, still needs to be tested! My first guess is, that
> this may not be compatible, but because of STREAMPIPES-127 it seems
> to
> be necessary to use another JdbcClien client anyway. At the moment I
> used some default values(public and false) to start the IotDB.class
> Sink like without compiling error.
> 
> 
>     initializeJdbc(
>             parameters.getGraph().getInputStreams().get(0).getEventSc
> he
> ma().getEventProperties(),
>             parameters.getIotDbHost(),
>             parameters.getIotDbPort(),
>             "",         // Database does not exist in  IoTDB model
>             "root." + parameters.getDbStorageGroup(),
>             parameters.getUsername(),
>             parameters.getPassword(),
>             ".*",
>             "org.apache.iotdb.jdbc.IoTDBDriver",
>             "iotdb",
>             LOG,
>             "public",
>             false);
> 
> Greetings
> Florian
> 
> [1] https://www.postgresql.org/docs/current/datatype-numeric.html
> [2] https://www.postgresqltutorial.com/postgresql-schema/
> [3] https://www.postgresql.org/docs/current/sql-droptable.html

Reply via email to