Package org.apache.beam.sdk.metrics
Class Lineage
java.lang.Object
org.apache.beam.sdk.metrics.Lineage
Standard collection of metrics used to record source and sinks information for lineage tracking.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the given fqn as lineage.voidadd(String system, @Nullable String subtype, Iterable<String> segments, @Nullable String lastSegmentSep) Add a FQN (fully-qualified name) to Lineage.voidAdd a FQN (fully-qualified name) to Lineage.voidAdd a FQN (fully-qualified name) to Lineage.static LineagegetSinks()Lineagerepresenting sinks.static LineageLineagerepresenting sources and optionally side inputs.query(MetricResults results, Lineage.Type type) QueryBoundedTriemetrics fromMetricResults.query(MetricResults results, Lineage.Type type, String truncatedMarker) QueryBoundedTriemetrics fromMetricResults.static StringwrapSegment(String value) Wrap segment to valid segment name.
-
Field Details
-
LINEAGE_NAMESPACE
- See Also:
-
-
Method Details
-
getSources
Lineagerepresenting sources and optionally side inputs. -
getSinks
Lineagerepresenting sinks. -
add
public void add(String system, @Nullable String subtype, Iterable<String> segments, @Nullable String lastSegmentSep) Add a FQN (fully-qualified name) to Lineage. Segments will be processed viagetFQNParts(java.lang.String, java.lang.String, java.lang.Iterable<java.lang.String>, java.lang.String). -
add
Add a FQN (fully-qualified name) to Lineage. Segments will be processed viagetFQNParts(java.lang.String, java.lang.String, java.lang.Iterable<java.lang.String>, java.lang.String). -
add
Add a FQN (fully-qualified name) to Lineage. Segments will be processed viagetFQNParts(java.lang.String, java.lang.String, java.lang.Iterable<java.lang.String>, java.lang.String). -
add
Adds the given fqn as lineage.- Parameters:
rollupSegments- should be an iterable of strings whose concatenation is a valid Dataplex FQN which is already escaped.In particular, this means they will often have trailing delimiters.
-
query
QueryBoundedTriemetrics fromMetricResults.- Parameters:
results- FQNs from the result.type- sources or sinks.truncatedMarker- the marker to use to represent truncated FQNs.- Returns:
- A flat representation of all FQNs. If the FQN was truncated then it has a trailing truncatedMarker.
-
query
QueryBoundedTriemetrics fromMetricResults.- Parameters:
results- FQNs from the resulttype- sources or sinks- Returns:
- A flat representation of all FQNs. If the FQN was truncated then it has a trailing '*'.
-
wrapSegment
Wrap segment to valid segment name.It escapes reserved characters
- Reserved characters are backtick, colon, whitespace (space, \t, \n) and dot.
- Only segments containing reserved characters must be escaped.
- Segments cannot be escaped partially (i.e. “bigquery:com`.`google.test”).
- Segments must be escaped using backticks (a.k.a. graves).
- Backticks must be escaped using backtick (i.e. bigquery:`test``test`) and the segment itself must be escaped as well.
-