ahmedabu98 commented on code in PR #31960:
URL: https://github.com/apache/beam/pull/31960#discussion_r1690121348


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQuerySourceBase.java:
##########
@@ -157,9 +157,6 @@ public List<BoundedSource<T>> split(long 
desiredBundleSizeBytes, PipelineOptions
       LOG.info("Extract job produced {} files", res.extractedFiles.size());
       if (res.extractedFiles.size() > 0) {
         BigQueryOptions bqOptions = options.as(BigQueryOptions.class);
-        // emit this table ID as a lineage source
-        Lineage.getSources()
-            .add(BigQueryHelpers.dataCatalogName(getTableToExtract(bqOptions), 
bqOptions));

Review Comment:
   We can keep Lineage support and instead store the output of 
`getTableToExtract` in a private variable.
   
   We can store the value when we perform `extractFiles`: 
https://github.com/apache/beam/blob/3d69dc97c41000d59d43a303912ac12d5f58dce3/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQuerySourceBase.java#L112-L114
   
   Then here, if stored table reference is not null we can add it to Lineage



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