Hello @arkiboys ,
Thanks for the question and using MS Q&A platform.
Is your cluster Databricks Runtime 7.3 LTS or above?
Cause:
If that is the case then this error usually occurs when the vectorized Parquet reader is decoding the decimal type column to a binary format
The vectorized Parquet reader is enabled by default in Databricks Runtime 7.3 and above for reading datasets in Parquet files. The read schema uses atomic data types: binary, boolean, date, string, and timestamp.
Note: Please note that this error only occurs if you have decimal type columns in the source data.
Resolution:
If you have decimal type columns in your source data, you should disable the vectorized Parquet reader.
Set
spark.sql.parquet.enableVectorizedReader
tofalse
in the cluster’s Spark configuration to disable the vectorized Parquet reader at the cluster level.
You can also disable the vectorized Parquet reader at the notebook level by running:
spark.conf.set("spark.sql.parquet.enableVectorizedReader","false")
Important Note: The vectorized Parquet reader enables native record-level filtering using push-down filters, improving memory locality, and cache utilization. If you disable the vectorized Parquet reader, there may be a minor performance impact. You should only disable it, if you have decimal type columns in your source data.
For detailed info please refer to this document: Apache Spark job fails with Parquet column cannot be converted error
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on or upvote button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
- Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators