cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between creating a schema manually vs schema through SQL code externally?

hpant
New Contributor III

I have created a bronze schema manually using catalog->create schema. I have provided external location. The "details" table look like this:

hpant_0-1722503455026.png

However, when I created silver schema but this time using sql script i.e. 

%sql
CREATE SCHEMA xyz.silver
MANAGED LOCATION '{location}';
 
The result is same but it has an extra section which is "properties" in "Details" table (highlighted in red color below):
hpant_1-1722503814577.png

Can anyone help me with this please?

1 REPLY 1

Vidhi_Khaitan
Databricks Employee
Databricks Employee

When a schema is created manually via the Databricks catalog UI, ownership defaults to the user who created the schema, and ownership properties may not be explicitly recorded by default.

On the other hand, when creating a schema using SQL commands, Databricks assigns explicit ownership details in the "properties" section to ensure clarity on schema ownership. The "owner=root" designation signifies that the schema owner is the root account or a default administrative account.