Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink DataFrame
    • DataFrame
    • DataFrame Creation
    • Input / Output
    • SQL
    • Data Types
    • User Defined Functions
    • Configuration
    • Catalog
    • GPU Support
    • AI / LLM
    • Multimodal Expressions
  • PyFlink Multimodal
  • PyFlink Table
  • PyFlink DataStream
  • PyFlink Common

pyflink.dataframe.create_statement_set#

create_statement_set() → StatementSet[source]#

Create a StatementSet from the DataFrame default TableEnvironment.

The returned StatementSet can be passed to DataFrame write helpers via statement_set= to stage multiple inserts for one execution.

Example:

>>> import pyflink.dataframe as pf
>>>
>>> orders = pf.from_records(
...     [(1, "book", 12.5), (2, "pen", 1.5)],
...     schema=["order_id", "item", "amount"],
... )
>>>
>>> statement_set = pf.create_statement_set()
>>> orders.write_json(
...     "/path/to/orders-json",
...     statement_set=statement_set,
... )
>>> orders.write_kafka(
...     "localhost:9092",
...     topic="orders",
...     statement_set=statement_set,
... )
>>> statement_set.execute()

previous

pyflink.dataframe.DataFrame.write_generic

next

SQL

Show Source

Created using Sphinx 4.5.0.