Reputation: 1023
How can I look at the contents (first few lines at least) of a CSV file stored in Data Lake from Azure Databricks notebook using the %fs commands.
Upvotes: 0
Views: 307
Reputation: 12788
To list the contents of a CSV file from Azure Gen2 storage in Azure Databricks notebook, you can use "dbutils.fs.head
" command.
Example: dbutils.fs.head("dbfs:/mnt/mountname/filename.csv")
dbutils.fs.head("dbfs:/mnt/chepra/drivers.csv")
Upvotes: 2