0

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

SA2010
  • 183
  • 4
  • 12

2 Answers2

1

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.

SA2010
  • 183
  • 4
  • 12
0

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.

Greenonline
  • 1,330
  • 8
  • 23
  • 31