pyspark.sql.DataFrameReader.changes#

DataFrameReader.changes(tableName)[source]#

Returns the row-level changes (Change Data Capture) from the specified table as a DataFrame. Currently this API is only supported for Data Source V2 tables whose catalog implements TableCatalog.loadChangelog().

Use option() to specify the version/timestamp range and processing options.

New in version 4.2.0.

Parameters
tableNamestr

string, name of the table.

Returns
DataFrame

Examples

>>> spark.read.option("startingVersion", "10").option(
...     "endingVersion", "20"
... ).changes("my_table")