databricks_schema Resource

June 12, 2026 ยท View on GitHub

API Documentation

Within a metastore, Unity Catalog provides a 3-level namespace for organizing data: Catalogs, Databases (also called Schemas), and Tables / Views.

-> This resource can only be used with a workspace-level provider!

A databricks_schema is contained within databricks_catalog and can contain tables & views.

Example Usage

resource "databricks_catalog" "sandbox" {
  name    = "sandbox"
  comment = "this catalog is managed by terraform"
  properties = {
    purpose = "testing"
  }
}

resource "databricks_schema" "things" {
  catalog_name = databricks_catalog.sandbox.id
  name         = "things"
  comment      = "this database is managed by terraform"
  properties = {
    kind = "various"
  }
}

Argument Reference

The following arguments are required:

  • name - Name of Schema relative to parent catalog. Change forces creation of a new resource.
  • catalog_name - Name of parent catalog. Change forces creation of a new resource.
  • storage_root - (Optional) Managed location of the schema. Location in cloud storage where data for managed tables will be stored. If the URL contains special characters, such as space, &, etc., they should be percent-encoded (space -> %20, etc.). If not specified, the location will default to the catalog root location. Change forces creation of a new resource.
  • owner - (Optional) Username/groupname/sp application_id of the schema owner.
  • comment - (Optional) User-supplied free-form text.
  • properties - (Optional) Extensible Schema properties.
  • enable_predictive_optimization - (Optional) Whether predictive optimization should be enabled for this object and objects under it. Can be ENABLE, DISABLE or INHERIT
  • force_destroy - (Optional) Delete schema regardless of its contents.
  • provider_config - (Optional) Configure the provider for management through account provider. This block consists of the following fields:
    • workspace_id - (Required) Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.

Attribute Reference

In addition to all arguments above, the following attributes are exported:

  • id - ID of this schema in form of <catalog_name>.<name>.
  • schema_id - The unique identifier of the schema.

Import

This resource can be imported by its full name:

import {
  to = databricks_schema.this
  id = "<catalog_name>.<name>"
}

Alternatively, when using terraform version 1.4 or earlier, import using the terraform import command:

terraform import databricks_schema.this "<catalog_name>.<name>"

The following resources are used in the same context: