Skip to main content
A TableIdentifier uniquely identifies a table within an Iceberg catalog by combining a namespace and table name.

Overview

TableIdentifier provides a standard way to reference tables across different catalog implementations. It consists of a namespace (which may be empty) and a table name.

Class

Creating Table Identifiers

of() with String Array

Creates a table identifier from an array of names. The last element is the table name, and preceding elements form the namespace.
Parameters:
  • names - Array where the last element is the table name and preceding elements are namespace levels
Returns: A new TableIdentifier instance Example:

of() with Namespace

Creates a table identifier from a namespace and table name.
Parameters:
  • namespace - A namespace
  • name - The table name
Returns: A new TableIdentifier instance Example:

parse()

Parses a table identifier from a dot-separated string.
Parameters:
  • identifier - A dot-separated identifier string
Returns: A new TableIdentifier instance Example:

Instance Methods

namespace()

Returns the identifier’s namespace.
Returns: The namespace Example:

name()

Returns the table name.
Returns: The table name Example:

hasNamespace()

Checks whether the namespace is not empty.
Returns: true if the namespace is not empty, false otherwise Example:

toLowerCase()

Returns a new identifier with all levels converted to lowercase.
Returns: A new TableIdentifier with lowercase namespace and name Example:

toString()

Returns a string representation of the identifier.
Returns: Dot-separated string representation Example:

Examples

Basic Usage with Catalog

Working with Multi-Level Namespaces

Parsing Identifiers

Case Conversion

Equality and Comparison

Validation

TableIdentifier enforces the following constraints:
  • Table name cannot be null or empty
  • Namespace cannot be null (but can be empty)
  • Cannot be created from a null array

See Also

  • Catalog - Catalog API for table operations
  • Namespace - Namespace representation
  • Table - Table API reference