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

Kaniz_Fatma
Community Manager
Community Manager

Hi @hpantIt looks like the difference you’re seeing is due to the way the schemas were created. When you create a schema manually through the catalog, it might not include certain default properties that are automatically added when you use a SQL script.

In your case, the “properties” section in the “Details” table for the silver schema is likely added by default when using the CREATE SCHEMA SQL command with the MANAGED LOCATION clause. This section can include metadata or configuration settings that are automatically applied by Databricks when creating the schema through SQL.

To ensure consistency between your manually created bronze schema and the SQL-created silver schema, you can manually add or adjust properties in the bronze schema to match those in the silver schema. Alternatively, you can create both schemas using SQL scripts to ensure they have the same structure and properties.

If you need further assistance with specific properties or configurations, feel free to share more details or ask additional questions! 😊

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group