Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-12385

AvroUtils exception when converting JDBC Row to GenericRecord

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.32.0
    • sdk-java-core
    • None

    Description

      `AvroUtils.toAvroSchema()` and `AvroUtils.toGenericRecord()` throw exception for JDBC specific logical types like: `DATE`, `NVARCHAR`, `VARCHAR`, `LONGVARCHAR` etc.

       

      pipeline
        .apply(JdbcIO.readRows()...)
        .apply(MapElements.via(
              (Row row) -> {
               // This statement throws Exception "Unhandled Logical Type"
                org.apache.avro.Schema schema = AvroUtils.toAvroSchema(row.getSchema());
              }));
      

       

       

      This can be handled by adding additional case-statements in AvroUtils:

      Attachments

        Issue Links

          Activity

            People

              anantdamle Anant Damle
              anantdamle Anant Damle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 6h 10m
                  6h 10m