Synapse Analytics Tutorial error - HdfsBridge::recordReaderFillBuffer - Unexpected error encountered filling record reader buffer: ClassCastException: class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are

Ricard Valero 30 Reputation points
2023-05-25T12:39:47.1066667+00:00

At stage 5 in the Get started tutorial for Azure Synapse Analytics (link = https://learn.microsoft.com/en-us/azure/synapse-analytics/get-started-analyze-sql-pool), an error occurs when attempting to Load the NYC Taxi Data into SQLPOOL1. See below.

support2

After pasting the code and running on Synapse, the error message is the following:

support3

HdfsBridge::recordReaderFillBuffer - Unexpected error encountered filling record reader buffer: ClassCastException: class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap')

Unsure what to do since neither the parquet file can be edited, and I simply just copied the SQL code above.

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,364 questions
{count} votes

Accepted answer
  1. BhargavaGunnam-MSFT 26,136 Reputation points Microsoft Employee
    2023-05-30T23:01:12.8+00:00

    Hello Dan Wheeler,

    The issue seems to be a data type mismatch between the source data and the target.

    Please download a different file (downloaded from the original dataset with a different year) and try again.

    https://learn.microsoft.com/en-us/azure/synapse-analytics/get-started-create-workspace#place-sample-data-into-the-primary-storage-account

    • Download the NYC Taxi - green trip dataset to your computer. Navigate to the original dataset location from the above link, choose a specific year and download the Green taxi trip records in Parquet format.
    • Rename the downloaded file to NYCTripSmall.parquet.
    • In Synapse Studio, navigate to the Data Hub.
    • Select Linked.
    • Under the category Azure Data Lake Storage Gen2 you'll see an item with a name like myworkspace ( Primary - contosolake ).
    • Select the container named users (Primary).
    • Select Upload and select the NYCTripSmall.parquet file you downloaded. I hope this helps.
    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Nived 5 Reputation points
    2023-06-23T09:36:25.0233333+00:00

    I think there is some major issue the parquet format is not allowing data type conversions. The error continues.

    I have tried with several files parquets format it is not working.

    1 person found this answer helpful.
    0 comments No comments

  2. Hoß, Jonathan 20 Reputation points
    2023-09-04T14:05:00.6633333+00:00

    I have the same issue. I tried several files from the years 2023-2019 "Green Taxi Trip Records from the provided datasets.

    0 comments No comments