spark-redshift icon indicating copy to clipboard operation
spark-redshift copied to clipboard

CSV file format while writing data to redsfhit.

Open vishooo opened this issue 6 years ago • 2 comments

Hi I am trying to use below code dataFrame.write.format("com.databricks.spark.redshift").option("url", url).option("tempdir", tempDir).option("tempFormat", "CSV").option("dbtable","test_csv1").option("aws_iam_role", iam).mode('overwrite').save()

But it is still storing data in avro format in s3 temp location. I am suing spark-redshift 2.11 connector

Originally posted by @vishooo in https://github.com/databricks/spark-redshift/issue_comments#issuecomment-451117579

vishooo avatar Jan 03 '19 11:01 vishooo

I'm having the same problem but using dataframe.read

agnarok avatar Apr 17 '20 02:04 agnarok

I believe you need spark 3.x in order to save tempdir in CSV format. Spark really should, at least, give an error when you try to specify an invalid tempdir file format. See this: https://github.com/databricks/spark-redshift/issues/308

ballcap231 avatar Jan 12 '21 17:01 ballcap231