Skip to main content
Ctrl+K
PyFlink 1.20+vvr.11.7.dev0 documentation - Home PyFlink 1.20+vvr.11.7.dev0 documentation - Home
  • API Reference
  • Examples
  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
    • TableEnvironment
    • Table
    • Data Types
    • Window
    • Expressions
    • User Defined Functions
    • Descriptors
    • StatementSet
    • Catalog
  • PyFlink DataStream
  • PyFlink DataFrame
  • PyFlink Common
  • API Reference
  • PyFlink Table
  • Table
  • pyflink.table.Table.add_or_replace_columns

pyflink.table.Table.add_or_replace_columns#

Table.add_or_replace_columns(*fields: Expression) → Table[source]#

Adds additional columns. Similar to a SQL SELECT statement. The field expressions can contain complex expressions, but can not contain aggregations. Existing fields will be replaced if add columns name is the same as the existing column name. Moreover, if the added fields have duplicate field name, then the last one is used.

Example:

>>> from pyflink.table.expressions import col, concat
>>> tab.add_or_replace_columns((col('a') + 1).alias('a1'),
...                            concat(col('b'), 'sunny').alias('b1'))
Parameters:

fields – Column list string.

Returns:

The result table.

previous

pyflink.table.Table.add_columns

next

pyflink.table.Table.aggregate

On this page
  • Table.add_or_replace_columns()

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.