BigQueryIO.Read (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1

Class BigQueryIO.Read

  • Enclosing class:

    public static class BigQueryIO.Read
    extends Object
    A PTransform that reads from a BigQuery table and returns a PCollection of TableRows containing each of the rows of the table.

    Each TableRow contains values indexed by column name. Here is a sample processing function that processes a "line" column from rows:

     static class ExtractWordsFn extends DoFn<TableRow, String> {
       public void processElement(ProcessContext c) {
         // Get the "line" field of the TableRow object, split it into words, and emit them.
         TableRow row = c.element();
         String[] words = row.get("line").toString().split("[^a-zA-Z']+");
         for (String word : words) {
           if (!word.isEmpty()) {

이 페이지가 도움이 되었나요? 평가를 부탁드립니다.

다음에 대한 의견 보내기...

도움이 필요하시나요? 지원 페이지를 방문하세요.