[
https://issues.apache.org/jira/browse/STREAMPIPES-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17107402#comment-17107402
]
Florian Micklich commented on STREAMPIPES-127:
----------------------------------------------
instead of Type DOUBLE >> DOUBLE PRECISION has to be used as follow in the
JdbcClient.class
{code:java}
protected enum SqlAttribute {
INTEGER("INT"), LONG("BIGINT"), FLOAT("FLOAT"), DOUBLE("DOUBLE
PRECISION"), STRING("VARCHAR(255)"), BOOLEAN("BOOLEAN");
private final String sqlName;
...
{code}
but is this compatible to other sinks?
> [Postgres Sink] Using Wrong datatype while cerating table
> ----------------------------------------------------------
>
> Key: STREAMPIPES-127
> URL: https://issues.apache.org/jira/browse/STREAMPIPES-127
> Project: StreamPipes
> Issue Type: Bug
> Affects Versions: 0.67.0
> Reporter: Florian Micklich
> Priority: Major
> Fix For: 0.67.0
>
>
> Starting the default ISS adapter and using th postgres sink together with the
> internal docker container.
> I get following error:
> {code:java}
> org.apache.streampipes.commons.exceptions.SpRuntimeException: ERROR: type
> "double" does not exist
> Position: 56
> {code}
> This happens during creating the table.
> Following create statement is used:
> {code:sql}
> CREATE TABLE "tabler" ( "timestamp" FLOAT, "longitude" DOUBLE, "latitude"
> DOUBLE );
> {code}
> but instead of double, float should be used like in timestamp.
> But don't know why double is used only in this case. This happens in the
> {code:java}
> statement.append(extractEventProperties(eventProperties))
> {code} Method in the JdbcClient.class
> The generel error is:
> {code:java}
> org.apache.streampipes.commons.exceptions.SpRuntimeException: ERROR: type
> "double" does not exist
> Position: 55
> at
> org.apache.streampipes.sinks.databases.jvm.jdbcclient.JdbcClient.createTable(JdbcClient.java:446)
> at
> org.apache.streampipes.sinks.databases.jvm.jdbcclient.JdbcClient.ensureTableExists(JdbcClient.java:258)
> at
> org.apache.streampipes.sinks.databases.jvm.jdbcclient.JdbcClient.connect(JdbcClient.java:212)
> at
> org.apache.streampipes.sinks.databases.jvm.jdbcclient.JdbcClient.initializeJdbc(JdbcClient.java:196)
> at
> org.apache.streampipes.sinks.databases.jvm.postgresql.PostgreSql.onInvocation(PostgreSql.java:39)
> at
> org.apache.streampipes.sinks.databases.jvm.postgresql.PostgreSql.onInvocation(PostgreSql.java:28)
> ...
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)