Error while reading a Parquet file (in Blob) in Azure Synapse via an External Table

Rohit 226 Reputation points
2021-10-18T16:09:14.353+00:00

Hi ,

I am trying to read data from a Parquet file on blob in Azure Synapse via an External Table , the file is generated from a SQL DB via ADF (Copy Activity)
The external table has datatype for all columns as varchar

While reading the data via external table , i am getting the below error :

HdfsBridge::recordReaderFillBuffer - Unexpected error encountered filling record reader buffer: ClassCastException: class java.lang.Integer cannot be cast to class parquet.io.api.Binary (java.lang.Integer is in module java.base of loader 'bootstrap'; parquet.io.api.Binary is in unnamed module of loader 'app')

Is there any way , this issue can be resolved.

Edit :

I also tried updating the destination datatype to string in mapping in ADF (editing the JSON script) & tried to create a file (Refer below screenshot) , was still not able to read the file via an External Table with the same error

141679-image.png

Is there any specific reason for this ?

Appreciate your help.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,422 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,647 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 78,576 Reputation points Microsoft Employee
    2021-10-19T08:15:55.3+00:00

    Hello @Rohit ,

    Thanks for the question and using MS Q&A platform.

    You may experience the following error if types are mismatched between Parquet and SQL or if you have unsupported Parquet data types: "HdfsBridge::recordReaderFillBuffer - Unexpected error encountered filling record reader buffer: ClassCastException: ...".

    To resolve this issue, make sure there is no mismatch between Parquet and SQL data types.

    For more details, refer to Data loading strategies for dedicated SQL pool in Azure Synapse Analytics - Define the tables.

    And also, you may refer to article ADF throws error: Unexpected error encountered filling record reader buffer ClassCastException which discuss similar issue.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png 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
    1 person found this answer helpful.