CREATE ZONE

Creates a new zone, the top-level namespace container in the catalog.

Category: catalogDeltaForge extension

Syntax

CREATE ZONE [IF NOT EXISTS] <name> [TYPE '<type>'] [CONNECTION <connection_name>] [STORAGE_ROOT = '<path>'] [COMMENT '<desc>']

Description

## Overview Creates a zone in the catalog. Zones are the top-level containers in the DeltaForge three-level namespace (zone.schema.table). They typically represent stages in a data lake architecture, such as bronze (raw), silver (cleansed), and gold (aggregated). Zones provide organizational and governance boundaries. Permissions can be granted at the zone level and inherited by all schemas and tables within it. ## Behavior - Zone names must be unique across the account. - If IF NOT EXISTS is specified and the zone already exists, the statement completes successfully and the existing zone is left completely untouched: TYPE, CONNECTION, STORAGE_ROOT, and COMMENT on the statement are all ignored. Reconfigure an existing zone through the GUI Zones page or the REST API instead. This makes the ensure-exists boilerplate at the top of demo and pipeline setup scripts safe to re-run against a zone the user has customized. - If IF NOT EXISTS is omitted and the zone already exists, the command returns an error. - The TYPE field is advisory metadata. It does not enforce storage layout or processing rules. - CONNECTION binds the zone to a storage connection (a data source created on the Connections page or with CREATE CONNECTION). The connection supplies the storage account/bucket, container, and credentials, so a connection-backed zone keeps its table data on the connected object store (Azure ADLS, S3, or GCS). The connection's backend is authoritative for the zone's storage type, so it overrides the TYPE mapping. Omitting CONNECTION creates a local zone (no connection), whose tables resolve under the deployment's default storage root. This mirrors the GUI Create Zone dialog's Connection dropdown. - STORAGE_ROOT is the GUI Path. For a local zone it is the storage root prefix; for a connection-backed zone it is a subpath under the connection's root. It is recorded as metadata and serves as the default path prefix when creating tables within the zone. - The command is routed through the control plane catalog API. A valid catalog router connection is required. - The creating principal is recorded as the zone owner. ## Compatibility CREATE ZONE is a DeltaForge extension. Zones serve the same organizational role as top-level databases in traditional SQL systems, but they are tightly integrated with the DeltaForge catalog and permission model.

Examples

-- Create a minimal zone
CREATE ZONE bronze;
-- Create a zone only if it does not already exist
CREATE ZONE IF NOT EXISTS silver;
-- Create a zone with a type and storage root
CREATE ZONE gold TYPE gold STORAGE_ROOT = 's3://data-lake/gold' COMMENT 'Business-ready aggregated data';
-- Create a zone backed by a storage connection (cloud object store).
-- The connection (created on the Connections page or with CREATE CONNECTION)
-- supplies the account, container, and credentials; tables in the zone then
-- live on the lake instead of local disk. STORAGE_ROOT is a subpath under the
-- connection's root.
CREATE ZONE IF NOT EXISTS ehr TYPE EXTERNAL CONNECTION my_adls STORAGE_ROOT = 'ehr' COMMENT 'Healthcare EHR zone';
-- Set up a full medallion architecture
CREATE ZONE IF NOT EXISTS bronze COMMENT 'Raw ingestion landing zone';
CREATE ZONE IF NOT EXISTS silver COMMENT 'Cleansed and conformed zone';
CREATE ZONE IF NOT EXISTS gold COMMENT 'Curated analytics zone';
-- Create an external zone for third-party data
CREATE ZONE IF NOT EXISTS external_feeds TYPE external STORAGE_ROOT = 's3://vendor-data/feeds' COMMENT 'Vendor CSV and JSON files';

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →