本文簡要介紹 python 語言中 pyflink.table.Table.fetch
的用法。
用法:
fetch(fetch: int) → pyflink.table.table.Table
將(可能已排序)結果限製為前 n 行。
此方法可以與前麵的
order_by()
調用結合使用以實現確定性順序,並與offset()
調用結合使用以在跳過前 o 行後返回 n 行。例子:
返回前 3 條記錄。
>>> tab.order_by(tab.name.desc).fetch(3)
跳過前 10 行並返回接下來的 5 行。
>>> tab.order_by(tab.name.desc).offset(10).fetch(5)
參數:
fetch- 要返回的記錄數。獲取必須 >= 0。
返回:
結果表。
相關用法
- Python pyflink Table.full_outer_join用法及代碼示例
- Python pyflink Table.filter用法及代碼示例
- Python pyflink Table.flat_aggregate用法及代碼示例
- Python pyflink Table.flat_map用法及代碼示例
- Python pyflink Table.intersect_all用法及代碼示例
- Python pyflink Table.right_outer_join用法及代碼示例
- Python pyflink Table.distinct用法及代碼示例
- Python pyflink Table.where用法及代碼示例
- Python pyflink Table.drop_columns用法及代碼示例
- Python pyflink Table.execute用法及代碼示例
- Python pyflink Table.minus_all用法及代碼示例
- Python pyflink Table.over_window用法及代碼示例
- 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 Table.limit用法及代碼示例
- Python pyflink Table.offset用法及代碼示例
- Python pyflink Table.group_by用法及代碼示例
- Python pyflink Table.add_columns用法及代碼示例
- Python pyflink Table.rename_columns用法及代碼示例
- Python pyflink Table.to_pandas用法及代碼示例
- Python pyflink Table.union用法及代碼示例
注:本文由純淨天空篩選整理自apache.org大神的英文原創作品 pyflink.table.Table.fetch。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。