(SchemaAndRecord elem) -> (Double) elem.getRecord().get("max_temperature")) .from(tableSpec) .withCoder(DoubleCoder.of())); .fromQuery( "SELECT max_temperature FROM [clouddataflow-readonly:samples.weather_stations]") .withCoder(DoubleCoder.of())); "SELECT max_temperature FROM `clouddataflow-readonly.samples.weather_stations`") .usingStandardSql() .withCoder(DoubleCoder.of())); + "FROM [clouddataflow-readonly:samples.weather_stations] " + "WHERE year BETWEEN 2007 AND 2009") .withCoder(AvroCoder.of(WeatherData.class)));
Read() { this(BigQueryIO.read(TableRowParser.INSTANCE).withCoder(TableRowJsonCoder.of())); }
/** * Like {@link #read(SerializableFunction)} but represents each row as a {@link TableRow}. * * <p>This method is more convenient to use in some cases, but usually has significantly lower * performance than using {@link #read(SerializableFunction)} directly to parse data into a * domain-specific type, due to the overhead of converting the rows to {@link TableRow}. */ public static TypedRead<TableRow> readTableRows() { return read(new TableRowParser()).withCoder(TableRowJsonCoder.of()); }