You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ege ucak (Jira)" <ji...@apache.org> on 2021/07/30 11:27:00 UTC

[jira] [Created] (BEAM-12693) WriteToJdbc does not respect 'statement' parameter in python

ege ucak created BEAM-12693:
-------------------------------

             Summary: WriteToJdbc does not respect 'statement' parameter in python
                 Key: BEAM-12693
                 URL: https://issues.apache.org/jira/browse/BEAM-12693
             Project: Beam
          Issue Type: Bug
          Components: io-java-jdbc, io-py-common
    Affects Versions: 2.31.0
            Reporter: ege ucak


I need to insert geometry into my postgresql database. My pipeline stage is a follows;
{code:python}
// code placeholder
| 'Write jdbc' >> WriteToJdbc(                  jdbc_url='jdbc:postgresql://localhost:5432/postgre',                    driver_class_name='org.postgresql.Driver', table_name='test',                username='postgres', password='postgres',
statement="""INSERT INTO test
VALUES(?, ?, ?, ST_GeomFromText(?), ?, ?, ?, ?, ?, ?)"""
{code}
I expect this code to write data to database and cast my text into geometry type while inserting. But it does not work.
  



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