I am new to ADB and trying to load data into a table in databricks using a parquet file and i am giving the following command :
load data local inpath '/FileStore/tables/Subsidiary__1_-2.parquet' into table Subsidiary
But it is throwing the error as follows :
Error in SQL statement: AnalysisException: LOAD DATA is not supported for datasource tables: `default`.`subsidiary`;
Can anyone explain why this is happening
Update: see the answer by Jacek, but it works only in specific situations
There is no such command in Spark SQL as load data
. The closest one is INSERT INTO that allows to insert data into table from other table.
But if you really want to access data in the given file, then you can use CREATE TABLE instead. Something like this:
CREATE TABLE IF NOT EXISTS Subsidiary
USING PARQUET
LOCATION '/FileStore/tables/Subsidiary__1_-2.parquet'