Class TableName
- java.lang.Object
-
- org.apache.beam.sdk.extensions.sql.impl.TableName
-
public abstract class TableName extends java.lang.ObjectRepresents a parsed table name that is specified in a FROM clause (and other places).
-
-
Constructor Summary
Constructors Constructor Description TableName()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.Stringcatalog()static TableNamecreate(java.lang.String path)Splits the input String by "." separator and returns a newTableName.static TableNamecreate(java.util.List<java.lang.String> fullPath)Full table name with path.static TableNamecreate(java.util.List<java.lang.String> path, java.lang.String tableName)Table name plus the path up to but not including table name.@Nullable java.lang.Stringdatabase()Returns the database name in this table path.abstract java.util.List<java.lang.String>getPath()Table path up to the leaf table name.java.lang.StringgetPrefix()First element in the path.abstract java.lang.StringgetTableName()Table name, the last element of the fully-specified table name with path.booleanisCompound()Whether it's a compound table name (with multiple path components).booleanisSimple()Whether it's a simple name, with a single name component.TableNameremovePrefix()Remove prefix, e.g.java.lang.StringtoString()
-
-
-
Method Detail
-
getPath
public abstract java.util.List<java.lang.String> getPath()
Table path up to the leaf table name.Does not necessarily start from a schema name.
Does not include the actual table name, see
getTableName().
-
getTableName
public abstract java.lang.String getTableName()
Table name, the last element of the fully-specified table name with path.
-
create
public static TableName create(java.lang.String path)
Splits the input String by "." separator and returns a newTableName.
-
create
public static TableName create(java.util.List<java.lang.String> fullPath)
Full table name with path.
-
create
public static TableName create(java.util.List<java.lang.String> path, java.lang.String tableName)
Table name plus the path up to but not including table name.
-
isCompound
public boolean isCompound()
Whether it's a compound table name (with multiple path components).
-
isSimple
public boolean isSimple()
Whether it's a simple name, with a single name component.
-
getPrefix
public java.lang.String getPrefix()
First element in the path.
-
removePrefix
public TableName removePrefix()
Remove prefix, e.g. this is helpful when stripping the top-level schema to register a table name with a provider.
-
database
@Pure public @Nullable java.lang.String database()
Returns the database name in this table path.
-
catalog
@Pure public @Nullable java.lang.String catalog()
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-