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.names- Array where the last element is the table name and preceding elements are namespace levels
of() with Namespace
Creates a table identifier from a namespace and table name.namespace- A namespacename- The table name
parse()
Parses a table identifier from a dot-separated string.identifier- A dot-separated identifier string
Instance Methods
namespace()
Returns the identifier’s namespace.name()
Returns the table name.hasNamespace()
Checks whether the namespace is not empty.toLowerCase()
Returns a new identifier with all levels converted to lowercase.toString()
Returns a string representation of the identifier.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