When I attempt to create a table with Databricks SQL I get the error:
AnalysisException: Unable to infer schema for CSV. It must be specified manually.
%sql
CREATE TABLE IF NOT EXISTS newtabletable USING csv OPTIONS (path "abfss://[email protected]/mnt/lake2/RAW/devices.csv",inferSchema 'True', header 'True');
However, I’m able to read the file using PySpark:
df = (spark.read
.option("header", "true")
.option("inferSchema", "true")
.csv('/mnt/lake2/RAW/devices.csv')
)
I am working with Azure Databricks. I this the issue is something to do with Unity Catalog, but not sure.