Sown7
New Contributor II

facing same issue - I have ~ 700 k rows and I am trying to write this table but it takes forever to write. Previously one time it took only like 5 sec to write but after that whenever we update the analysis and rewrite the table it takes very long and sometimes feels like it is stuck.

We have about 500 columns and about 250 have null information. We do a fillna as we dont want to remove these columns. 

Kindly advise

 

Below is the code we use.

df.write.mode("overwrite").partitionBy("c1").option("numPartitions", 1000).saveAsTable("catalog.schema.table")