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

Handle nulls using SnowflakeIO

Details

    • Bug
    • Status: Open
    • P2
    • Resolution: Unresolved
    • 2.38.0
    • None
    • io-java-snowflake

    Description

      When SnowflakeIO is used within python beam code using ReadFromSnowflake [1] ; the returned data isn't able to list the nulls from snowflake side.

      The nulls from snowflake becomes b'N' ; which is a wrong value and gives incorrect value for the column. In case of strings the actual value can also be 'N'. So it becomes tough to handle it in csv_mapper.

      To mitigate this we are using query instead of table and using ifnull / coleasce within the select query for String columns. For non-string columns we are converting back b'N' to null or empty as per requirement.

       

      [1] : https://beam.apache.org/releases/pydoc/2.33.0/apache_beam.io.snowflake.html#apache_beam.io.snowflake.ReadFromSnowflake

       

       

      Attachments

        1. csv_mapper_data.png
          24 kB
          Varun
        2. snowflake_data.png
          6 kB
          Varun

        Activity

          People

            Unassigned Unassigned
            Varun Rauthan Varun
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: