[ 
https://issues.apache.org/jira/browse/BEAM-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brian Hulette updated BEAM-13717:
---------------------------------
    Description: 
Currently, we can't use the logical types defined in [java JDBC 
IO|https://github.com/apache/beam/blob/master/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/LogicalTypes.java]
 in XLang pipelines for JDBC IO in Go SDK as it throws the following error:
{code:java}
  unmarshalling coder jFYvjSCanTRowCoder_length_prefixed_windowed
        unmarshalling coder jFYvjSCanTRowCoder_length_prefixed
cannot convert schema field role_name to field
        caused by:
unknown logical type: beam:logical_type:javasdk:v1 {code}
This is the structure of table and its corresponding struct:
{code:java}
// roles=> CREATE TABLE roles(
//         role_id serial PRIMARY KEY,
//         role_name VARCHAR (255) UNIQUE
//  );

type JdbcTestRow struct {
        Role_id   int32  `beam:"role_id"`
        Role_name string `beam:"role_name"`
} {code}
Similar error seems to be appearing on Python SDK pipeline based on this stack 
overflow question: 
([https://stackoverflow.com/questions/68758361/error-beamlogical-typejavasdkv1-while-using-apache-beam-io-jdbc-readfromjdbc])

  was:
Currently, we can't use the logical types defined in [java JDBC 
IO|[https://github.com/apache/beam/blob/master/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/LogicalTypes.java]]
 in XLang pipelines for JDBC IO in Go SDK as it throws the following error:
{code:java}
  unmarshalling coder jFYvjSCanTRowCoder_length_prefixed_windowed
        unmarshalling coder jFYvjSCanTRowCoder_length_prefixed
cannot convert schema field role_name to field
        caused by:
unknown logical type: beam:logical_type:javasdk:v1 {code}
This is the structure of table and its corresponding struct:
{code:java}
// roles=> CREATE TABLE roles(
//         role_id serial PRIMARY KEY,
//         role_name VARCHAR (255) UNIQUE
//  );

type JdbcTestRow struct {
        Role_id   int32  `beam:"role_id"`
        Role_name string `beam:"role_name"`
} {code}
Similar error seems to be appearing on Python SDK pipeline based on this stack 
overflow question: 
([https://stackoverflow.com/questions/68758361/error-beamlogical-typejavasdkv1-while-using-apache-beam-io-jdbc-readfromjdbc])


> Can't use java logical types defined in Java JDBC IO in XLang JDBC pipeline 
> for Go and Python
> ---------------------------------------------------------------------------------------------
>
>                 Key: BEAM-13717
>                 URL: https://issues.apache.org/jira/browse/BEAM-13717
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-jdbc
>            Reporter: Ritesh Ghorse
>            Assignee: Pablo Estrada
>            Priority: P2
>
> Currently, we can't use the logical types defined in [java JDBC 
> IO|https://github.com/apache/beam/blob/master/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/LogicalTypes.java]
>  in XLang pipelines for JDBC IO in Go SDK as it throws the following error:
> {code:java}
>   unmarshalling coder jFYvjSCanTRowCoder_length_prefixed_windowed
>         unmarshalling coder jFYvjSCanTRowCoder_length_prefixed
> cannot convert schema field role_name to field
>         caused by:
> unknown logical type: beam:logical_type:javasdk:v1 {code}
> This is the structure of table and its corresponding struct:
> {code:java}
> // roles=> CREATE TABLE roles(
> //         role_id serial PRIMARY KEY,
> //         role_name VARCHAR (255) UNIQUE
> //  );
> type JdbcTestRow struct {
>         Role_id   int32  `beam:"role_id"`
>         Role_name string `beam:"role_name"`
> } {code}
> Similar error seems to be appearing on Python SDK pipeline based on this 
> stack overflow question: 
> ([https://stackoverflow.com/questions/68758361/error-beamlogical-typejavasdkv1-while-using-apache-beam-io-jdbc-readfromjdbc])



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to