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:ย 

Multiple sources found for csv

Jackson1111
New Contributor III

When I run a job using spark2 jar, I then run a python job to report :Multiple sources found for csv (org.apache.spark.sql.execution.datasources.v2.csv.CSVDataSourceV2, org.apache.spark.sql.execution.datasources.csv.CSVFileFormat), please specify the fully qualified class name.

My python code is  

 df = self.spark.read.csv(full_data_file_path, header=False,  schema=schema,sep=sep)
1 REPLY 1

daniel_sahal
Esteemed Contributor

@Jackson1111 
It looks like you've installed two different libraries to handle CSV data.
You need to specify which one you want to use, ex:

df = self.spark.read.format("org.apache.spark.sql.execution.datasources.v2.csv.CSVDataSourceV2").option("header", False).option("schema", schema).option("sep", sep).load(full_data_file_path)

 

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