本文簡要介紹 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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。