Forum Discussion
felipe_regis
2 years agoNew Member
Failed to create table and schema
hi folks I failed to run a simple create table into a spark notebook using python and then in SQL as well. It follows my code: %%sql
CREATE TABLE IF NOT EXISTS sales.sales_silver (
...
- 2 years ago
felipe_regis , Yes we can't create schema in the lakehouse. In the code given in the lab the sales denotes lakehouse name not the schema. So if you haven't created the sales lakehouse your code will show this error.
frithjof_v
Community Champion
2 years agoIf I remember correctly, only Warehouse support schema, not Lakehouse
If you try with
CREATE TABLE IF NOT EXISTS sales_silver (SalesOrderNumber string,
SalesOrderLineNumber int);
then it should work, if you are trying to create a Lakehouse delta table from a Notebook
(leave out the "sales." part and I don't think you need the "using delta" part)