0

I am having 2 csv files i want to load the csv files into data frames in pyspark while joining 2 files I am not having any issues but while retrieving results I am facing an error please help me this

Deliveries Csv having 21 columns and matches csv having 18 columns

My code looks like below

df1=spark.read.csv(r"C:\deliveries.csv",header=True,inferSchema=True)
df2=spark.read.csv(r"C:\matches.csv",header=True,inferSchema=True)
df  = df1.join(df2, df1.match_id == df2.id, how='inner')
df.show(10)

I am getting following error Truncated the string representation of a plan since it was too large. This behavior can be adjusted by setting 'spark.debug.maxToStringFields' in SparkEnv.conf.

So I tried to increase the size by using following command in pyspark

spark.conf.set("spark.sql.debug.maxToStringFields", 1000)

still same issue iam facing any help appreciated

Nikunj Kakadiya
  • 2,689
  • 2
  • 20
  • 35
Chanukya
  • 5,833
  • 1
  • 22
  • 36

0 Answers0