Querying the CSV files in Databricks volume
Requirement
Requirement:
Write a Databricks PySpark code to read the d_product_revenue.csv file from the specified volume path and create a table named d_product_revenue_file. After loading the file, verify the row count in the CSV file matches the row count in the table.to Finally, grant “SELECT“ permission and “MODIFY“ permission to ganesh.guruprasath@agilisium.com and SELECT permission to dhinesh.muthupandian@agilisium.com for the table d_product_revenue_file.
Volume Information: /Volumes/agilisium_playground/purgo_playground/d_product_revenue_csv/d_product_revenue.csv
Prerequisite:
* Drop the table d_product_revenue_file if exist
* Create the d_product_revenue_file table perform the requirement.
* Don’t define schema for csv
Unity Catalog Information: purgo_playground.d_product_revenue_file
Expected Output: Databricks PySpark Code and purgo_playground.d_product_revenue_file