You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampipes.apache.org by "Tim Bossenmaier (Jira)" <ji...@apache.org> on 2021/03/16 13:17:00 UTC

[jira] [Commented] (STREAMPIPES-126) [Postgres Sink] Tries to Creating Table for each incomming event

    [ https://issues.apache.org/jira/browse/STREAMPIPES-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17302509#comment-17302509 ] 

Tim Bossenmaier commented on STREAMPIPES-126:
---------------------------------------------

Writing values to a postgresql table works fine in my test (random data generator + postgres sink).
Inside the onEvent method the createTable method is only executed if tableExists is false. So this should only be the case if an error occurred before.

> [Postgres Sink] Tries to Creating Table for each incomming event
> ----------------------------------------------------------------
>
>                 Key: STREAMPIPES-126
>                 URL: https://issues.apache.org/jira/browse/STREAMPIPES-126
>             Project: StreamPipes
>          Issue Type: Bug
>    Affects Versions: 0.66.0, 0.67.0
>            Reporter: Florian Micklich
>            Assignee: Tim Bossenmaier
>            Priority: Major
>             Fix For: 0.68.0
>
>
> Hi,
> I simple creates a random stream adapter and used the postgres sink together with the internal docker postgres container ( user1 ...)
> The pipeline is starting without error but I get a console error:
> {code:java}
> 14:37:12.627 SP [Thread-2] ERROR o.a.s.s.d.jvm.postgresql.PostgreSql - USERLOG - correspondingPipeline: 37cad1cf-a7cc-468e-8c23-aadf964728cb - peURI: http://host.docker.internal:7015/sec/org.apache.streampipes.sinks.databases.jvm.postgresql/37cad1cf-a7cc-468e-8c23-aadf964728cb-org.apache.streampipes.SRIOtjvrYzNxYSAFsyJz-postgresql-3 - ERROR: relation "table" already exists
> {code}
> It seems to me that the create table statement is used on each event (onEvent-method) and not in the onInvocation method.
> The table is created and can't be created again because the name is already used.
> So no data is stored at the moment in the sink.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)