riteshghorse commented on code in PR #27080:
URL: https://github.com/apache/beam/pull/27080#discussion_r1232444969


##########
learning/tour-of-beam/learning-content/io/big-query-io/read-table/python-example/task.py:
##########
@@ -26,35 +28,42 @@
 #     - hellobeam
 
 import argparse
+import os
+import warnings
+
 import apache_beam as beam
-from apache_beam.io import ReadFromText
-from apache_beam.io import WriteToBigQuery
-from apache_beam.options.pipeline_options import PipelineOptions
-from apache_beam.options.pipeline_options import SetupOptions
+from apache_beam.options.pipeline_options import PipelineOptions, 
GoogleCloudOptions, SetupOptions
+#from google.cloud import bigquery
+from apache_beam.io.gcp.bigquery import ReadFromBigQueryRequest, 
ReadAllFromBigQuery
+
+class WeatherData:
+    def __init__(self, station_number, wban_number, year, month, day):
+        self.station_number = station_number
+        self.wban_number = wban_number
+        self.year = year
+        self.month = month
+        self.day = day
 
+    def __str__(self):
+        return f"Weather Data: Station {self.station_number} (WBAN 
{self.wban_number}), Date: {self.year}-{self.month}-{self.day}"
 
 def run(argv=None):
     parser = argparse.ArgumentParser()
-    parser.add_argument('--input',
-                        dest='input',
-                        default='gs://bucket',
-                        help='Input file to process.')
 
     known_args, pipeline_args = parser.parse_known_args(argv)
 
     pipeline_options = PipelineOptions(pipeline_args)
-    pipeline_options.view_as(SetupOptions).save_main_session = True
+    pipeline_options.view_as(PipelineOptions)

Review Comment:
   what are you intending to do with this statement?



##########
learning/tour-of-beam/learning-content/io/big-query-io/read-table/java-example/Task.java:
##########
@@ -33,38 +35,42 @@
 import org.apache.beam.sdk.io.gcp.bigquery.BigQueryOptions;
 import org.apache.beam.sdk.options.PipelineOptions;
 import org.apache.beam.sdk.options.PipelineOptionsFactory;
-import org.apache.beam.sdk.transforms.DoFn;
-import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.transforms.*;

Review Comment:
   To keep things clean I would recommend not using `.*` instead specific 
packages. 
   May be someone from from java side can tell @Abacn 



##########
learning/tour-of-beam/learning-content/io/big-query-io/read-table/python-example/task.py:
##########
@@ -26,35 +28,42 @@
 #     - hellobeam
 
 import argparse
+import os
+import warnings
+
 import apache_beam as beam
-from apache_beam.io import ReadFromText
-from apache_beam.io import WriteToBigQuery
-from apache_beam.options.pipeline_options import PipelineOptions
-from apache_beam.options.pipeline_options import SetupOptions
+from apache_beam.options.pipeline_options import PipelineOptions, 
GoogleCloudOptions, SetupOptions
+#from google.cloud import bigquery

Review Comment:
   okay to remove the comment import if we are not using it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to