本文简要介绍 python 语言中 pyflink.table.TableResult.get_table_schema
的用法。
用法:
get_table_schema() → pyflink.table.table_schema.TableSchema
获取结果的架构。
DDL、USE、EXPLAIN 的架构:
+-------------+-------------+----------+ | column name | column type | comments | +-------------+-------------+----------+ | result | STRING | | +-------------+-------------+----------+
SHOW的架构:
+---------------+-------------+----------+ | column name | column type | comments | +---------------+-------------+----------+ | <object name> | STRING | | +---------------+-------------+----------+ The column name of `SHOW CATALOGS` is "catalog name", the column name of `SHOW DATABASES` is "database name", the column name of `SHOW TABLES` is "table name", the column name of `SHOW VIEWS` is "view name", the column name of `SHOW FUNCTIONS` is "function name".
DESCRIBE 的架构:
+------------------+-------------+-------------------------------------------------+ | column name | column type | comments | +------------------+-------------+-------------------------------------------------+ | name | STRING | field name | +------------------+-------------+-------------------------------------------------+ | type | STRING | field type expressed as a String | +------------------+-------------+-------------------------------------------------+ | null | BOOLEAN | field nullability: true if a field is nullable, | | | | else false | +------------------+-------------+-------------------------------------------------+ | key | BOOLEAN | key constraint: 'PRI' for primary keys, | | | | 'UNQ' for unique keys, else null | +------------------+-------------+-------------------------------------------------+ | computed column | STRING | computed column: string expression | | | | if a field is computed column, else null | +------------------+-------------+-------------------------------------------------+ | watermark | STRING | watermark: string expression if a field is | | | | watermark, else null | +------------------+-------------+-------------------------------------------------+
INSERT 的模式:(每个接收器一列)
+----------------------------+-------------+-----------------------+ | column name | column type | comments | +----------------------------+-------------+-----------------------+ | (name of the insert table) | BIGINT | the insert table name | +----------------------------+-------------+-----------------------+
SELECT 的架构是选定的字段名称和类型。
返回:
结果的架构。
返回类型:
版本 1.11.0 中的新函数。
相关用法
- Python pyflink TableResult.collect用法及代码示例
- Python pyflink Table.intersect_all用法及代码示例
- Python pyflink Table.fetch用法及代码示例
- Python pyflink TableEnvironment.create_temporary_function用法及代码示例
- Python pyflink Table.right_outer_join用法及代码示例
- Python pyflink Table.distinct用法及代码示例
- Python pyflink TableEnvironment.register_table_source用法及代码示例
- Python pyflink Table.where用法及代码示例
- Python pyflink TableEnvironment.create_java_temporary_function用法及代码示例
- Python pyflink Table.drop_columns用法及代码示例
- Python pyflink Table.execute用法及代码示例
- Python pyflink Table.minus_all用法及代码示例
- Python pyflink TableEnvironment.use_catalog用法及代码示例
- Python pyflink Table.over_window用法及代码示例
- Python pyflink TableEnvironment.create_temporary_system_function用法及代码示例
- Python pyflink TableDescriptor.Builder.option用法及代码示例
- Python pyflink Table.union_all用法及代码示例
- Python pyflink Table.left_outer_join_lateral用法及代码示例
- Python pyflink Table.add_or_replace_columns用法及代码示例
- Python pyflink Table.join用法及代码示例
- Python pyflink Table.minus用法及代码示例
- Python pyflink Table.execute_insert用法及代码示例
- Python pyflink TableEnvironment.create_temporary_table用法及代码示例
- Python pyflink TableConfig.set_idle_state_retention_time用法及代码示例
- Python pyflink Table.limit用法及代码示例
注:本文由纯净天空筛选整理自apache.org大神的英文原创作品 pyflink.table.TableResult.get_table_schema。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。