svetakvsundhar commented on code in PR #17159:
URL: https://github.com/apache/beam/pull/17159#discussion_r927702505


##########
sdks/python/apache_beam/io/gcp/bigquery.py:
##########
@@ -2520,33 +2545,39 @@ def _expand_direct_read(self, pcoll):
     else:
       project_id = pcoll.pipeline.options.view_as(GoogleCloudOptions).project
 
-    def _get_pipeline_details(unused_elm):
-      pipeline_details = {}
-      if temp_table_ref is not None:
-        pipeline_details['temp_table_ref'] = temp_table_ref
-      elif project_id is not None:
-        pipeline_details['project_id'] = project_id
-        pipeline_details[
-            'bigquery_dataset_labels'] = self.bigquery_dataset_labels
-      return pipeline_details
-
-    project_to_cleanup_pcoll = beam.pvalue.AsList(
-        pcoll.pipeline
-        | 'ProjectToCleanupImpulse' >> beam.Create([None])
-        | 'MapProjectToCleanup' >> beam.Map(_get_pipeline_details))
-
-    return (
-        pcoll
-        | beam.io.Read(
-            _CustomBigQueryStorageSource(
-                pipeline_options=pcoll.pipeline.options,
-                method=self.method,
-                use_native_datetime=self.use_native_datetime,
-                temp_table=temp_table_ref,
-                bigquery_dataset_labels=self.bigquery_dataset_labels,
-                *self._args,
-                **self._kwargs))
-        | _PassThroughThenCleanupTempDatasets(project_to_cleanup_pcoll))
+      def _get_pipeline_details(unused_elm):
+        pipeline_details = {}
+        if temp_table_ref is not None:
+          pipeline_details['temp_table_ref'] = temp_table_ref
+        elif project_id is not None:
+          pipeline_details['project_id'] = project_id
+          pipeline_details[
+              'bigquery_dataset_labels'] = self.bigquery_dataset_labels
+        return pipeline_details
+
+      project_to_cleanup_pcoll = beam.pvalue.AsList(
+          pcoll.pipeline
+          | 'ProjectToCleanupImpulse' >> beam.Create([None])
+          | 'MapProjectToCleanup' >> beam.Map(_get_pipeline_details))
+
+      return (
+          pcoll
+          | beam.io.Read(
+              _CustomBigQueryStorageSource(
+                  pipeline_options=pcoll.pipeline.options,
+                  method=self.method,
+                  use_native_datetime=self.use_native_datetime,
+                  temp_table=temp_table_ref,
+                  bigquery_dataset_labels=self.bigquery_dataset_labels,
+                  *self._args,
+                  **self._kwargs))
+          | _PassThroughThenCleanupTempDatasets(project_to_cleanup_pcoll))

Review Comment:
   hm no I didn't intend to touch this. I'll revert this back to what it 
previously was



-- 
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