Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

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

pyflink.dataframe.DataFrame.join#

DataFrame.join(other: pyflink.dataframe.dataframe.DataFrame, on: Optional[Union[str, pyflink.table.expression.Expression, List[str]]] = None, how: str = 'inner', left_on: Optional[Union[str, pyflink.table.expression.Expression, List[str]]] = None, right_on: Optional[Union[str, pyflink.table.expression.Expression, List[str]]] = None) → pyflink.dataframe.dataframe.DataFrame[source]#

Join with another DataFrame.

Parameters
  • other – Right DataFrame to join.

  • on – Join key(s) when both DataFrames have the same column names.

  • how – Join type. One of “inner”, “left”, “right”, “full”, “outer”.

  • left_on – Left join key(s).

  • right_on – Right join key(s).

Returns

A new DataFrame with the join result.

Example::
>>> df1.join(df2, on="id")
>>> df1.join(df2, on=col('id') == col('user_id'))
>>> df1.join(df2, left_on="id", right_on="user_id")
>>> df1.join(df2, on=["id", "name"], how="left")

Note

When on= is a column name (str or list of str) shared by both sides, the duplicate column is projected away in the result (pandas-style USING semantics). The same applies when left_on and right_on name the same column on both sides. Pass a boolean Expression (e.g. col('id') == col('d_id')) to keep both columns and skip the deduplication.

previous

pyflink.dataframe.DataFrame.agg

next

pyflink.dataframe.DataFrame.join_asof

Show Source

Created using Sphinx 4.5.0.