Class OpenLineageDataSetResolver
java.lang.Object
org.odpi.openmetadata.frameworks.integration.openlineage.OpenLineageDataSetResolver
OpenLineageDataSetResolver finds every element in open metadata that describes an OpenLineage dataset. The
dataset's namespace names the server (for example postgres://host:5432) and its name the resource within it (for
example sales.public.orders). The matches are divided into two lists:
- Physical elements describe the physical landscape - the database table, topic or file itself. These are the elements that the lineage from OpenLineage events is attached to.
- Abstractions - TabularDataSet and TabularDataSetCollection assets - are views over the physical data (for example the data sets of digital products). They are linked to the physical elements with DataSetContent rather than carrying lineage themselves.
- the qualified name, for datasets in the "egeria" namespace;
- the resourceName and namespacePath properties, which hold the OpenLineage name and namespace for elements catalogued from OpenLineage events or by connectors that follow the OpenLineage naming conventions;
- the endpoints of the connections of the elements catalogued by Egeria's technology connectors:
- relational tables (postgres, mssql, oracle and db2 namespaces with a {database}.{schema}.{table} name): the database's endpoint (a JDBC URL naming the host, port and database) leads to the RelationalDatabase or DeployedDatabaseSchema asset, and the table is the RelationalTable schema attribute that the JDBC integration connector catalogued beneath it ({databaseQN}::{schema}::{table} or {schemaQN}::{table});
- relational schemas ({database}.{schema} name, as used for the endpoint of a tabular data set collection): the DeployedDatabaseSchema;
- Kafka topics: the topic whose endpoint names the topic and whose connection's bootstrap servers include the broker;
- local files: the data stores whose pathName is the dataset name;
- Unity Catalog tables: the table named {deployedImplementationType}::{server URL}::{full name} by the Unity Catalog connectors.
The physical elements are ranked so that the first one is the element to use: elements catalogued by technology connectors come before elements that were created from OpenLineage events (whose qualified name is {typeName}::{namespace}::{name}), and within each group the oldest comes first.
Results are cached for a short time because the same datasets appear in every run of a job.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAn element that describes an OpenLineage dataset.static final recordThe elements that describe an OpenLineage dataset. -
Constructor Summary
ConstructorsConstructorDescriptionOpenLineageDataSetResolver(ConnectorContextBase context, String sourceName) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidForget a cached resolution, for example because an element has been created for the dataset.static StringgetOpenLineageQualifiedName(String typeName, String namespace, String name) Return the qualified name that elements created from OpenLineage events are given.booleanisAbstraction(ElementControlHeader elementHeader) Is the element an abstraction over physical data (a TabularDataSet or TabularDataSetCollection)?Find every element that describes an OpenLineage dataset.
-
Constructor Details
-
OpenLineageDataSetResolver
Constructor.- Parameters:
context- context of the calling connector or governance servicesourceName- name of the caller (for logging and property helper calls)
-
-
Method Details
-
getOpenLineageQualifiedName
Return the qualified name that elements created from OpenLineage events are given.- Parameters:
typeName- open metadata type of the elementnamespace- OpenLineage namespacename- OpenLineage name- Returns:
- qualified name
-
isAbstraction
Is the element an abstraction over physical data (a TabularDataSet or TabularDataSetCollection)?- Parameters:
elementHeader- header of the element- Returns:
- boolean
-
resolve
public OpenLineageDataSetResolver.ResolvedDataSet resolve(String namespace, String name) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Find every element that describes an OpenLineage dataset.- Parameters:
namespace- dataset namespacename- dataset name- Returns:
- resolved dataset (the lists are empty if nothing matches)
- Throws:
InvalidParameterException- invalid parameterPropertyServerException- repository problemUserNotAuthorizedException- security problem
-
forget
Forget a cached resolution, for example because an element has been created for the dataset.- Parameters:
namespace- dataset namespacename- dataset name
-