Reputation: 323
How do I write the contents of a deltalake table to a csv file in Azure databricks? Is there a way where I do not have to first dump the contents to a dataframe? https://docs.databricks.com/delta/delta-batch.html
Upvotes: 0
Views: 5217
Reputation: 16
You can simply use Insert Overwrite Directory
.
The syntax would be
INSERT OVERWRITE DIRECTORY <directory_path> USING <file_format> <options> select * from table_name
Here you can specify the target directory path where to generate the file. The file could be parquet, csv, txt, json, etc.
Upvotes: 0
Reputation: 323
While loading the data to the Delta table, I used an ADLS Gen2 folder location for the creation of the versioned parquet files.
The conversion of parquet to CSV could then be accomplished using the Copy Data Activity in ADF.
Upvotes: 1