diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/Lineage.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/Lineage.java index ab64389fe198..65ec12af0580 100644 --- a/sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/Lineage.java +++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/Lineage.java @@ -112,7 +112,7 @@ public static String getFqName(String system, Iterable segments) { * Add a FQN (fully-qualified name) to Lineage. Segments will be processed via {@link #getFqName}. */ public void add(String system, @Nullable String subtype, Iterable segments) { - metric.add(getFqName(system, subtype, segments)); + add(getFqName(system, subtype, segments)); } /** @@ -122,6 +122,14 @@ public void add(String system, Iterable segments) { add(system, null, segments); } + /** + * Adds the given details as Lineage. For asset level lineage the resource location should be + * specified as Dataplex FQN https://cloud.google.com/data-catalog/docs/fully-qualified-names + */ + public void add(String details) { + metric.add(details); + } + /** Query {@link StringSet} metrics from {@link MetricResults}. */ public static Set query(MetricResults results, Type type) { MetricsFilter filter =