pyflink.table.table_environment.StreamTableEnvironment.from_path#
- StreamTableEnvironment.from_path(path: str) pyflink.table.table.Table #
Reads a registered table and returns the resulting
Table
.A table to scan must be registered in the
TableEnvironment
.See the documentation of
use_database()
oruse_catalog()
for the rules on the path resolution.Examples:
Reading a table from default catalog and database.
>>> tab = table_env.from_path("tableName")
Reading a table from a registered catalog.
>>> tab = table_env.from_path("catalogName.dbName.tableName")
Reading a table from a registered catalog with escaping. (Table is a reserved keyword). Dots in e.g. a database name also must be escaped.
>>> tab = table_env.from_path("catalogName.`db.Name`.`Table`")
- Parameters
path – The path of a table API object to scan.
- Returns
Either a table or virtual table (=view).
See also
See also
New in version 1.10.0.