首页 > 解决方案 > Apache Spark Column 具有无法使用 PySpark 参与列存储索引的数据类型

问题描述

每当我尝试在 Apache Spark 上使用 PySpark 将数据从 Apache Spark 传输到 Azure SQLDW 时,都会出现以下错误:

Column 'cd_created_date' has a data type that cannot participate in a columnstore index

我的架构如下:

root
 |-- extraction_date: string (nullable = true)
 |-- ce_case_data_id: string (nullable = true)
 |-- cd_created_date: string (nullable = true)
 |-- cd_last_modified: string (nullable = true)
 |-- cd_jurisdiction: string (nullable = true)
 |-- cd_latest_state: string (nullable = true)
 |-- cd_reference: string (nullable = true)
 |-- cd_security_classification: string (nullable = true)
 |-- cd_version: string (nullable = true)
 |-- cd_last_state_modified_date: string (nullable = true)

失败从“cd_created_date”字段开始,但我相信我也会收到“cd_last_state_modified_date”的错误。

我的猜测是我需要更改这些字段的架构来解决问题,但我不确定。有什么想法吗?

标签: apache-sparkpysparkazure-synapse

解决方案


推荐阅读