Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
    • TableEnvironment
    • Table
    • Data Types
    • Window
    • Expressions
    • User Defined Functions
    • Descriptors
    • StatementSet
    • Catalog
  • PyFlink DataStream
  • PyFlink Common

pyflink.table.Table.fetch#

Table.fetch(fetch: int) → pyflink.table.table.Table[source]#

Limits a (possibly sorted) result to the first n rows.

This method can be combined with a preceding order_by() call for a deterministic order and offset() call to return n rows after skipping the first o rows.

Example:

Returns the first 3 records.

>>> tab.order_by(col('name').desc).fetch(3)

Skips the first 10 rows and returns the next 5 rows.

>>> tab.order_by(col('name').desc).offset(10).fetch(5)
Parameters

fetch – The number of records to return. Fetch must be >= 0.

Returns

The result table.

previous

pyflink.table.Table.explain

next

pyflink.table.Table.filter

Show Source

Created using Sphinx 4.5.0.