Record Class OpenLineageNamespace
java.lang.Object
java.lang.Record
org.odpi.openmetadata.frameworks.integration.openlineage.OpenLineageNamespace
- Record Components:
scheme- canonical scheme, or null if the address has none (for example a Kafka bootstrap server host:port)host- host name in lower case, or nullport- port number, or null if it is not knowndatabase- database (or Oracle service) named in the address, or nullschema- database schema named in the address, or null
public record OpenLineageNamespace(String scheme, String host, String port, String database, String schema)
extends Record
OpenLineageNamespace is the parsed form of the location of a data source. It is created either from an
OpenLineage dataset namespace (for example postgres://db.example.com:5432, see
the OpenLineage naming conventions) or from the network
address of an Egeria endpoint (for example jdbc:postgresql://db.example.com:5432/sales), so that the two can be
compared. Schemes are reduced to the OpenLineage spelling (postgresql becomes postgres, sqlserver becomes mssql)
and missing ports are filled in with the technology's default port.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringNamespace for datasets that are identified by the qualified name of an element in open metadata. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondatabase()Returns the value of thedatabaserecord component.final booleanIndicates whether some other object is "equal to" this one.static OpenLineageNamespacefromNamespace(String namespace) Parse an OpenLineage dataset namespace such as postgres://host:5432, kafka://broker:9092 or file.static OpenLineageNamespacefromNetworkAddress(String networkAddress) Parse the network address of an Egeria endpoint.static StringgetCanonicalScheme(String scheme) Return the spelling of a scheme used in the OpenLineage naming conventions.final inthashCode()Returns a hash code value for this object.host()Returns the value of thehostrecord component.static booleanisOpenLineageNamespace(String value) Is the value shaped like an OpenLineage dataset namespace? This distinguishes the OpenLineage namespace stored in an asset's namespacePath from other uses of that property (such as a Unity Catalog catalog.schema prefix).booleanisSameServer(OpenLineageNamespace other) Do the two locations describe the same server? The schemes must match when both are known, and the hosts and ports must match (after default ports are filled in).port()Returns the value of theportrecord component.schema()Returns the value of theschemarecord component.scheme()Returns the value of theschemerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EGERIA_NAMESPACE
Namespace for datasets that are identified by the qualified name of an element in open metadata.- See Also:
-
-
Constructor Details
-
Method Details
-
getCanonicalScheme
Return the spelling of a scheme used in the OpenLineage naming conventions.- Parameters:
scheme- scheme from a namespace or network address- Returns:
- lower case, canonical scheme (null if scheme is null)
-
isOpenLineageNamespace
Is the value shaped like an OpenLineage dataset namespace? This distinguishes the OpenLineage namespace stored in an asset's namespacePath from other uses of that property (such as a Unity Catalog catalog.schema prefix).- Parameters:
value- value to test- Returns:
- boolean
-
fromNamespace
Parse an OpenLineage dataset namespace such as postgres://host:5432, kafka://broker:9092 or file.- Parameters:
namespace- OpenLineage namespace- Returns:
- parsed namespace (null if namespace is null)
-
fromNetworkAddress
Parse the network address of an Egeria endpoint. The recognized forms are the JDBC URLs used by Egeria's database templates, URLs with a scheme and authority, and plain host:port addresses (as used for Kafka bootstrap servers).- Parameters:
networkAddress- network address- Returns:
- parsed address, or null if the address is not recognized
-
isSameServer
Do the two locations describe the same server? The schemes must match when both are known, and the hosts and ports must match (after default ports are filled in).- Parameters:
other- other location- Returns:
- boolean
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
scheme
Returns the value of theschemerecord component.- Returns:
- the value of the
schemerecord component
-
host
Returns the value of thehostrecord component.- Returns:
- the value of the
hostrecord component
-
port
Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-
database
Returns the value of thedatabaserecord component.- Returns:
- the value of the
databaserecord component
-
schema
Returns the value of theschemarecord component.- Returns:
- the value of the
schemarecord component
-