Class SchemaUtil


  • public class SchemaUtil
    extends java.lang.Object
    Provides utility functions for working with Beam Schema types.
    • Constructor Summary

      Constructors 
      Constructor Description
      SchemaUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean compareSchemaField​(org.apache.beam.sdk.schemas.Schema.Field a, org.apache.beam.sdk.schemas.Schema.Field b)
      compares two fields.
      static org.apache.beam.sdk.schemas.Schema toBeamSchema​(java.sql.ResultSetMetaData md)
      Infers the Beam Schema from ResultSetMetaData.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SchemaUtil

        public SchemaUtil()
    • Method Detail

      • toBeamSchema

        public static org.apache.beam.sdk.schemas.Schema toBeamSchema​(java.sql.ResultSetMetaData md)
                                                               throws java.sql.SQLException
        Infers the Beam Schema from ResultSetMetaData.
        Throws:
        java.sql.SQLException
      • compareSchemaField

        public static boolean compareSchemaField​(org.apache.beam.sdk.schemas.Schema.Field a,
                                                 org.apache.beam.sdk.schemas.Schema.Field b)
        compares two fields. Does not compare nullability of field types.
        Parameters:
        a - field 1
        b - field 2
        Returns:
        TRUE if fields are equal. Otherwise FALSE