[
https://issues.apache.org/jira/browse/STREAMPIPES-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17308682#comment-17308682
]
Tim Bossenmaier commented on STREAMPIPES-127:
---------------------------------------------
To resolve this issue, we have to implement {{SqlAttribute}} dependent to the
specific SQL sink.
This is covered in STREAMPIPES-320.
> [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
> Assignee: Tim Bossenmaier
> Priority: Major
> Fix For: 0.68.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)