pyflink.dataframe.DataFrame.join_lateral#
- DataFrame.join_lateral(table_function_call: Union[pyflink.table.expression.Expression, DataFrameUDTFCall], *, on: Optional[pyflink.table.expression.Expression[bool]] = None, ignore_empty: bool = True) DataFrame[source]#
Join with an element-wise UDTF call.
ignore_empty=Trueuses inner lateral join semantics.ignore_empty=Falsepreserves input rows whose UDTF emits no rows.DataFrame UDTF calls use output names from
aliaswhen present; otherwise they use namedTypedDictor structreturn_dtypefields. Raw Expression arguments must define output column names withalias. The DataFrame API validates those output names against existing columns. Theonpredicate is a boolean expression, matching the Table API lateral join predicate.- Example::
>>> from typing import Iterator >>> from pyflink.dataframe import col, udtf >>> >>> @udtf ... def chars(text: str) -> Iterator[str]: ... for ch in text: ... yield ch >>> >>> df.join_lateral(chars(col("text")).alias("ch")) >>> df.join_lateral( ... chars(col("text")).alias("ch"), ... on=col("id") > 0, ... ) >>> df.join_lateral( ... chars(col("text")).alias("ch"), ... ignore_empty=False, ... )