[INSUFFICIENT_PERMISSIONS] Insufficient privileges:
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 04:58 AM
While reading csv file using spark and listing the files under a folder using data bricks utils, I am getting below error:
[INSUFFICIENT_PERMISSIONS] Insufficient privileges: User does not have permission SELECT on any file. SQLSTATE: 42501
File <command-1200317151894398>, line 2 1 spark_df = spark.read.csv("sample_csv.csv") ----> 2 display(spark_df)
File /databricks/python_shell/dbruntime/display.py:131, in Display.display(self, input, *args, **kwargs) 129 # This version is for Serverless + Spark Connect dogfooding. 130 elif self.spark_connect_enabled and isinstance(input, ConnectDataFrame): --> 131 self.display_connect_table(input, **kwargs) 132 elif isinstance(input, ConnectDataFrame):
------
But able to read and write csv files using pandas in the same environment.
Below is the code which I used:
------
But able to read and write csv files using pandas in the same environment.
Below is the code which I used:
import pandas as pd
df = pd.read_csv("sample_csv.csv")
sample_csv.csv is the file I created and I have "can manage" privilege on it.
Kindly help me with resolving the issue.
display(df)
spark_df = spark.read.csv("sample_csv.csv")
display(spark_df)
files = dbutils.fs.ls("path")