Catalog#
Catalog#
Catalog is responsible for reading and writing metadata such as database/table/views/UDFs from a registered catalog. It connects a registered catalog and Flink’s Table API.
Get the name of the default database for this catalog. |
|
Get the names of all databases in this catalog. |
|
|
Get a database from this catalog. |
|
Check if a database exists in this catalog. |
|
Create a database. |
|
Drop a database. |
|
Modify an existing database. |
|
Get names of all tables and views under this database. |
|
Get names of all views under this database. |
|
Get a CatalogTable or CatalogView identified by tablePath. |
|
Check if a table or view exists in this catalog. |
|
Drop a table or view. |
|
Rename an existing table or view. |
|
Create a new table or view. |
|
Modify an existing table or view. |
|
Get CatalogPartitionSpec of all partitions of the table. |
|
Get a partition of the given table. |
|
Check whether a partition exists or not. |
|
Create a partition. |
|
Drop a partition. |
|
Alter a partition. |
|
List the names of all functions in the given database. |
|
Get the function. |
|
Check whether a function exists or not. |
|
Create a function. |
|
Modify an existing function. |
|
Drop a function. |
|
Get the statistics of a table. |
|
Get the column statistics of a table. |
|
Get the statistics of a partition. |
Get a list of statistics of given partitions. |
|
Get the column statistics of a partition. |
|
Get a list of the column statistics for the given partitions. |
|
|
Update the statistics of a table. |
Update the column statistics of a table. |
|
Update the statistics of a table partition. |
|
Update the column statistics of a table partition. |
CatalogDatabase#
Represents a database object in a catalog.
|
Creates an instance of CatalogDatabase. |
Get a map of properties associated with the database. |
|
Get comment of the database. |
|
Get a deep copy of the CatalogDatabase instance. |
|
Get a brief description of the database. |
|
Get a detailed description of the database. |
CatalogBaseTable#
CatalogBaseTable is the common parent of table and view. It has a map of key-value pairs defining the properties of the table.
|
Create an instance of CatalogBaseTable for the catalog table. |
|
Create an instance of CatalogBaseTable for the catalog view. |
Returns a map of string-based options. |
|
Get the schema of the table. |
|
Returns the schema of the table or view. |
|
Get comment of the table or view. |
|
Get a deep copy of the CatalogBaseTable instance. |
|
Get a brief description of the table or view. |
|
Get a detailed description of the table or view. |
CatalogPartition#
Represents a partition object in catalog.
|
Creates an instance of CatalogPartition. |
Get a map of properties associated with the partition. |
|
Get a deep copy of the CatalogPartition instance. |
|
Get a brief description of the partition object. |
|
Get a detailed description of the partition object. |
|
Get comment of the partition. |
CatalogFunction#
Represents a partition object in catalog.
|
Creates an instance of CatalogDatabase. |
Get the full name of the class backing the function. |
|
Create a deep copy of the function. |
|
Get a brief description of the function. |
|
Get a detailed description of the function. |
|
Whether or not is the function a flink UDF. |
|
Get the language used for the function definition. |
ObjectPath#
A database name and object (table/view/function) name combo in a catalog.
CatalogPartitionSpec#
Represents a partition spec object in catalog. Partition columns and values are NOT of strict order, and they need to be re-arranged to the correct order by comparing with a list of strictly ordered partition keys.
Get the partition spec as key-value map. |
CatalogTableStatistics#
Statistics for a non-partitioned table or a partition of a partitioned table.
The number of rows in the table or partition. |
|
The number of files on disk. |
|
The total size in bytes. |
|
The raw data size (size when loaded in memory) in bytes. |
|
Create a deep copy of "this" instance. |
CatalogColumnStatistics#
Column statistics of a table or partition.
HiveCatalog#
A catalog implementation for Hive.
|
A catalog implementation for Hive. |
JdbcCatalog#
A catalog implementation for Jdbc.
|
A catalog implementation for Jdbc. |
Column#
Representation of a column in a ResolvedSchema.
A table column describes either a pyflink.table.catalog.PhysicalColumn,
pyflink.table.catalog.ComputedColumn, or pyflink.table.catalog.MetadataColumn.
|
Creates a regular table column that represents physical data. |
|
Creates a computed column that is computed from the given |
|
Creates a metadata column from metadata of the given column name or from metadata of the given key (if not null). |
|
Add the comment to the column and return the new object. |
Returns whether the given column is a physical column of a table; neither computed nor metadata. |
|
Returns whether the given column is persisted in a sink operation. |
|
Returns the data type of this column. |
|
Returns the name of this column. |
|
Returns the comment of this column. |
|
Returns a string that summarizes this column for printing to a console. |
|
Returns an explanation of specific column extras next to name and type. |
|
|
Returns a copy of the column with a replaced |
|
Returns a copy of the column with a replaced name. |
WatermarkSpec#
Representation of a watermark specification in ResolvedSchema.
It defines the rowtime attribute and a ResolvedExpression
for watermark generation.
|
Creates a |
Returns the name of a rowtime attribute. |
|
Returns the |
|
Prints the watermark spec in a readable way. |
Constraint#
Integrity constraints, generally referred to simply as constraints, define the valid states of SQL-data by constraining the values in the base tables.
Returns the name of the constraint. |
|
Constraints can either be enforced or non-enforced. |
|
Returns the type of the constraint, which could be PRIMARY_KEY or UNIQUE_KEY. |
|
Prints the constraint in a readable way. |
UniqueConstraint#
A unique key constraint. It can be declared also as a PRIMARY KEY.
List of column names for which the primary key was defined. |
|
Returns a string representation of the underlying constraint type. |
ResolvedSchema#
Schema of a table or view consisting of columns, constraints, and watermark specifications.
This class is the result of resolving a Schema into a final validated
representation.
Data types and functions have been expanded to fully qualified identifiers.
Time attributes are represented in the column’s data type.
pyflink.table.Expressionhave been translated topyflink.table.catalog.ResolvedExpression
This class should not be passed into a connector. It is therefore also not serializable.
Instead, the to_physical_row_data_type() can be
passed around where necessary.
|
Shortcut for a resolved schema of only columns. |
|
Shortcut for a resolved schema of only physical columns. |
Returns the number of |
|
Returns all |
|
Returns all column names. |
|
Returns all column data types. |
|
|
Returns the |
Returns a list of watermark specifications each consisting of a rowtime attribute and watermark strategy expression. |
|
Returns the primary key if it has been defined. |
|
Returns the primary key indexes, if any, otherwise returns an empty list. |
|
Converts all columns of this schema into a (possibly nested) row data type. |
|
Converts all physical columns of this schema into a (possibly nested) row data type. |
|
Converts all persisted columns of this schema into a (possibly nested) row data type. |