Package org.apache.beam.sdk.io.jdbc
Class SchemaUtil
- java.lang.Object
-
- org.apache.beam.sdk.io.jdbc.SchemaUtil
-
public class SchemaUtil extends java.lang.ObjectProvides utility functions for working with BeamSchematypes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSchemaUtil.BeamRowMapperAJdbcIO.RowMapperimplementation that converts JDBC results into BeamRowobjects.
-
Constructor Summary
Constructors Constructor Description SchemaUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancompareSchemaField(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.SchematoBeamSchema(java.sql.ResultSetMetaData md)Infers the BeamSchemafromResultSetMetaData.
-
-
-
Method Detail
-
toBeamSchema
public static org.apache.beam.sdk.schemas.Schema toBeamSchema(java.sql.ResultSetMetaData md) throws java.sql.SQLExceptionInfers the BeamSchemafromResultSetMetaData.- 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 1b- field 2- Returns:
- TRUE if fields are equal. Otherwise FALSE
-
-