Forum Discussion
dungtran12
1 year agoNew Member
Help with Authentication failed and not presented in the request when reading a CSV file
Hello, I tried the Micrososft Fabric tutorial on saving and reading the CSV file to and from the Lakehouse. https://learn.microsoft.com/en-us/fabric/data-science/tutorial-data-science-inges...
- 1 year ago
Hello,
It worked! I I used the spark read api to load data from csv file from the lakehouse.
df = spark.read.format("csv").option("header","true").load("Files/churn/raw/churn.csv") display(df)Thanks,
Du
dungtran12
1 year agoNew Member
Hello,
I would like to update that it worked when I used the pandas read as followed:
df = pd.read_csv("abfss://[email protected]/MinhTRanLakehouse.Lakehouse/Files/churn/raw/churn.csv")
df.head()However, the Spark read still did not work. It still complaint about authentication failed and not presented in the request when reading a CSV file
{"error":{"code":"Unauthorized","message":"Authentication Failed with Bearer token is not present in the request"}}Do you know what was missing with the Spark read?
Thanks,
Du
##df = (
## spark.read.option("header", True)
## .option("inferSchema", True)
## .csv("/lakehouse/default/Files/churn/raw/churn.csv")
## .cache()
##)
df = spark.read.format ("csv").option("header","true").load ("/lakehouse/default/Files/churn/raw/churn.csv")
- dungtran121 year agoNew Member
Hello,
It worked! I I used the spark read api to load data from csv file from the lakehouse.
df = spark.read.format("csv").option("header","true").load("Files/churn/raw/churn.csv") display(df)Thanks,
Du