cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to read file from dbfs location in databricks.

Data_Engineer3
Contributor III

When i tried to read file from dbfs, it throws error - Caused by: FileReadException: Error while reading file dbfs:/.......................parquet is not a Parquet file. Expected magic number at tail [80, 65, 82, 49] but found [105, 108, 101, 115].

But I checked the file location and types and alll it shows Parquet format and data present inside. I couldn't get idea of it.

1 ACCEPTED SOLUTION

Accepted Solutions

Are you able to list all the files in this folder location by using dbutils? You might need to read the Parquet file using the following examples https://docs.databricks.com/data/data-sources/read-parquet.html

View solution in original post

3 REPLIES 3

Hi @Kaniz Fatma (Databricks)​ ,

Command, I used spark.sql command to read table data, where data is getting stored as parquet format.

I am trying to read data from dbfs location, its a parquet file only. I have cross checked with by doing ls command file is present.

Are you able to list all the files in this folder location by using dbutils? You might need to read the Parquet file using the following examples https://docs.databricks.com/data/data-sources/read-parquet.html

No, I am not able to read file by dbutils command itself. It throwing same error.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group