Trying to write the data into BigQuery table using BeamSQL. To write the data we need schema of that data. Used org.apache.beam.sdk.schemas for defining schema of the data collection. We have Numeric data type column in that data collection. Want to know, what is the equivalent data type for Numeric in org.apache.beam.sdk.schemas.Schema.FieldType class. Some one please help me use the equivalent schema of Numeric data type.
BeamSQL's Decimal can present BigQuery's NUMERIC. BeamSQL's Decimal is implemented by Java's BigDecimal, which itself supports arbitrary precision according to Java doc. The downside of it is performance because BigDecimal is not a Java primitive(encode and decode will be expensive compared to FLOAT or DOUBLE).