I am trying to read a .csv file from windows C drive to databricks. I tried the following code after going through some of the answers.
# remove the 'file' string and use 'r' or 'u' prefix to indicate raw/unicore string format
# Option 1
#PATH = r'C:\customers_marketing.csv' # raw string
# Option 2
PATH = u'C:\\customers_marketing.csv' # unicode string
customers_marketing = spark.read.csv(PATH, header="true", inferSchema="true")
However, I was not able to read it to databricks. I get the following error.
IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: C:%5Ccustomers_marketing.csv
Could anyone pls advise/suggest how can I read data from windows c drive to databricks.
Thanks in advance