Abacn commented on code in PR #31805:
URL: https://github.com/apache/beam/pull/31805#discussion_r1688811790


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQuerySourceBase.java:
##########
@@ -152,9 +155,10 @@ public List<BoundedSource<T>> split(long 
desiredBundleSizeBytes, PipelineOptions
     if (cachedSplitResult == null) {
       ExtractResult res = extractFiles(options);
       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)));

Review Comment:
   BigQueryQuerySource.getTableToExtract will call 
BigQueryQuerySource.getTableReference run a BigQuery query job, which is 
expensive. This caused internal test error
   
   We should cache the result of `getTableToExtract`, or get this name from 
elsewhere



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