April 2018
Beginner to intermediate
282 pages
9h 53m
English
The following example is written in Java and shows constructing and running a pipeline with three transforms; they are:
The code for the same is as follows:
public static void main(String[] args) { // create a pipeline parameterized by command-line flags PipelineOptions options = PipelineOptionsFactory.fromArgs(args); Pipeline p = Pipeline.create(options); p.apply(TextIO.Read.from(“gs://...”)) // read input p.apply(new CountWords()) // do processing p.apply(TextIO.Write.to(“gs://...”)); // write output p.run(); // run the pipeline}