Enterprise naming convention
Use this skill whenever the user asks to create or rewrite Databricks SQL so object names follow the enterprise naming convention.
Rules
- Use lowercase snake_case for schemas, tables, and columns.
- Schema names must follow
<domain>_<layer>where layer is one ofraw,refined, orserving. - If a schema only contains a domain name, convert it to
<domain>_serving. - Table names must start with
tbl_. - Column naming rules:
- identifiers end with
_id - date columns end with
_dt - timestamp columns end with
_ts - boolean columns start with
is_ - monetary amount columns end with
_amt
- identifiers end with
- Remove spaces, hyphens, camelCase, and PascalCase from identifiers.
- Preserve data types, nullability, comments, table properties, partitions, and business meaning.
- Do not change SQL logic unless required to rename objects and columns.
- Return only the corrected SQL unless the user explicitly asks for an explanation.
- If a rename is ambiguous, make the safest business-preserving choice and add a one-line SQL comment explaining the assumption.
Example
Input:
CREATE TABLE Sales.Orders (
OrderID BIGINT,
CustomerID BIGINT,
OrderDate DATE,
TotalAmount DECIMAL(12,2),
IsActive BOOLEAN,
CreatedAt TIMESTAMP
);