public class FilterExamples
extends java.lang.Object
Concepts: The Mean transform; Options configuration; using pipeline-derived data as a side input; approaches to filtering, selection, and projection.
The example reads public samples of weather data from BigQuery. It performs a projection on the data, finds the global mean of the temperature readings, filters on readings for a single given month, and then outputs only data (for that month) that has a mean temp smaller than the derived global mean.
Note: Before running this example, you must create a BigQuery dataset to contain your output table.
To execute this pipeline locally, specify the BigQuery table for the output:
--output=YOUR_PROJECT_ID:DATASET_ID.TABLE_ID
[--monthFilter=<month_number>]
where optional parameter --monthFilter is set to a number 1-12.
To change the runner, specify:
--runner=YOUR_SELECTED_RUNNER
See examples/java/README.md for instructions about how to configure different runners.
The BigQuery input table defaults to clouddataflow-readonly:samples.weather_stations
and can be overridden with --input.
| Modifier and Type | Class and Description |
|---|---|
static interface |
FilterExamples.Options
Options supported by
FilterExamples. |
| Constructor and Description |
|---|
FilterExamples() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args) |