我们如何在一个数据帧中的多个列上进行透视。例如,这里提到的例子,https://spark.apache.org/docs/latest/sql-ref-syntax-qry-select-pivot.html SELECT * FROM personPIVOT ( FOR (name, age) IN (('John', 30) AS c1,
我正在尝试使用databricks中的Scala对数据帧进行转换。 在这里,我尝试删除有空值的country_region,并尝试用0填充NA的活动、确认、死亡和恢复的剩余列。val JHU_COVID_19: DataFrame = spark.read .options(options) val fi
我使用的是spark v2.4,我试图在spark sql中运行pivot函数,但每次都会出错。metric_sk, metric_value from ( from pivot_temp) as t (
SUM(metric_value) for metric_sk in (attainment, sales_trx, sales_nr