Class ResourceIdentifier

java.lang.Object
io.github.flink.gcp.connector.base.lineage.ResourceIdentifier
All Implemented Interfaces:
Serializable

@PublicEvolving public final class ResourceIdentifier extends Object implements Serializable
A configured physical resource reported in a PhysicalResourceFacet.

The namespace and name identify a lineage dataset. The identity retains resource components that a rendered name can obscure, including configured Spanner identifier quoting. It contains resource identifiers only, never credentials, SQL, record data, or a connector option map. Equality includes all four properties, so distinct configured identities are not conflated.

This read-only listener API keeps its package name in every SQL connector jar.

See Also:
  • Constructor Details

    • ResourceIdentifier

      @Internal public ResourceIdentifier(String kind, String namespace, String name, Map<String,String> identity)
      Constructs a snapshot for connector-internal metadata assembly.

      This is not a user-facing dataset declaration API. The constructor is public so relocated connector helpers can construct the unrelocated listener value.

      Parameters:
      kind - the resource kind supplied by the connector's resource factory
      namespace - the canonical dataset namespace
      name - the canonical dataset name
      identity - resource identity components only; keys and values must be non-null
  • Method Details

    • kind

      public String kind()
      Returns the physical resource kind: bigquery-table, pubsub-topic, pubsub-subscription, bigtable-table, spanner-table, spanner-change-stream, or cloudtasks-queue. A BigQuery table identity can also name an explicitly configured view; extraction does not discover its service-side object type.
    • namespace

      public String namespace()
      Returns the canonical physical dataset namespace.
    • name

      public String name()
      Returns the canonical physical dataset name.
    • identity

      public Map<String,String> identity()
      Returns immutable configured resource components, ordered by key.

      Keys are the applicable subset of project, dataset, table, topic, subscription, instance, database, schema, stream, location, and queue. An absent schema is omitted. Spanner schema and table values retain their configured syntax rather than being split from name().

    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object