Abacn commented on code in PR #32561:
URL: https://github.com/apache/beam/pull/32561#discussion_r1775998087
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/BatchSpannerRead.java:
##########
@@ -251,6 +259,22 @@ public void processElement(ProcessContext c) throws
Exception {
throw (e);
}
serviceCallMetric.call("ok");
+ // Report Lineage metrics
+ @Nullable String tableName = op.getReadOperation().tryGetTableName();
+ if (!Objects.equals(reportedLineage, tableName)) {
+ ImmutableList.Builder<String> segments =
+ ImmutableList.<String>builder()
+ .add(
+ projectId,
+ spannerAccessor.getInstanceConfigId(),
Review Comment:
Per doc spanner FQN has format
`spanner:{projectId}.{instanceConfigId}.{instanceId}.{databaseId}.{assetId}`
However, currently instanceConfigId is not mentioned throughout SpannerIO.
Had to make a real API call to get instance config Id.
cc: @manitgupta would like to learn if there a better way to do this.
--
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]