使用Python3.10,Delta-Spark 2.4.0,我需要查看在PySpark中的MERGE语句的执行计划.
对于数据帧操作,df.explain()
提供了它,但我还没有找到查看Merge()的物理计划的方法.
有没有一种方法可以看到以下explain(mode="extended")
的类似功能?
df = spark.sql("SELECT * FROM table")
tablePath = "/path/to/deltalake"
tbl = DeltaTable.forPath(spark, tablePath)
table.alias("target") \
.merge(
source=df.alias("source"),
condition=condition) \
.whenMatchedUpdateAll() \
.whenNotMatchedInsertAll() \
.execute()