.fromQuery( "SELECT max_temperature FROM `clouddataflow-readonly.samples.weather_stations`") .usingStandardSql() .withCoder(DoubleCoder.of()));
bigQueryIOPTransform = bigQueryIOPTransform.usingStandardSql(); } else {
bigQueryIOPTransform = bigQueryIOPTransform.usingStandardSql(); } else {
@Override public PCollectionTuple expand(PBegin begin) { return begin .apply( "AvroToEntity", BigQueryIO.read( AvroToEntity.newBuilder() .setEntityKind(entityKind()) .setUniqueNameColumn(uniqueNameColumn()) .setNamespace(namespace()) .build()) .fromQuery(query()) .withoutValidation() .withTemplateCompatibility() .usingStandardSql()) .apply( "CheckNoKey", CheckNoKey.newBuilder() .setFailureTag(failureTag()) .setSuccessTag(successTag()) .build()); } }
/** * Enables BigQuery's Standard SQL dialect when reading from a query. * * <p>Only valid when a query is used ({@link #fromQuery}). Setting this option when reading * from a table will cause an error during validation. */ public Read usingStandardSql() { return new Read(this.inner.usingStandardSql()); }