Κοινή χρήση μέσω


LIVE schema (legacy)

This article provides an overview of the legacy syntax and behavior for the LIVE virtual schema.

The LIVE virtual schema is a legacy feature of Delta Live Tables pipelines and is considered deprecated. You can still use legacy publishing mode and the LIVE virtual schema for pipelines that were created with this mode. Databricks recommends migrating all pipelines to the new publishing mode. Support for legacy LIVE virtual schema and legacy publishing mode will be removed in a future version of Azure Databricks.

Note

You cannot use the pipeline configuration UI to create new pipelines with the legacy publishing mode. If you need to deploy new pipelines using legacy LIVE syntax, contact your Databricks account representative.

What is the LIVE virtual schema?

Note

The LIVE virtual schema is no longer needed to analyze dataset dependency in the default publishing mode for Delta Live Tables.

The LIVE schema is a programming concept in Delta Live Tables that defines a virtual boundary for all datasets created or updated in a pipeline. By design, the LIVE schema is not tied directly to datasets in a published schema. Instead, the LIVE schema allows logic in a pipeline to be planned and run even if a user does not want to publish datasets to a schema.

In legacy pipeline publishing mode, you can use the LIVE keyword to reference other datasets in the current pipeline for reads, for example, SELECT * FROM LIVE.bronze_table. In the default publishing mode for new Delta Live Tables pipelines, this syntax is silently ignored, meaning that unqualified identifiers use the current schema. See Set the target catalog and schema.

Legacy pipeline publishing mode

The LIVE virtual schema is used with the legacy Delta Live Tables pipeline publishing mode. All tables created before February 5, 2025, use legacy publishing mode by default.

The following table describes the behavior for all materialized views and streaming tables created or updated in a pipeline in the legacy publishing mode:

Storage option Storage location or catalog Target schema Behavior
Hive metastore None specified None specified Dataset metadata and data are stored to the DBFS root. No database objects are registered to the Hive metastore.
Hive metastore A URI or file path to cloud object storage. None specified Dataset metadata and data are stored to the specified storage location. No database objects are registered to the Hive metastore.
Hive metastore None specified An existing or new schema in the Hive metastore. Dataset metadata and data are stored to the DBFS root. All materialized views and streaming tables in the pipeline are published to the specified schema in Hive metastore.
Hive metastore A URI or file path to cloud object storage. An existing or new schema in the Hive metastore. Dataset metadata and data are stored to the specified storage location. All materialized views and streaming tables in the pipeline are published to the specified schema in Hive metastore.
Unity Catalog An existing Unity Catalog catalog. None specified Dataset metadata and data are stored in the default storage location associated with the target catalog. No database objects are registered to the Unity Catalog.
Unity Catalog An existing Unity Catalog catalog. An existing or new schema in Unity Catalog. Dataset metadata and data are stored in the default storage location associated with the target schema or catalog. All materialized views and streaming tables in the pipeline are published to the specified schema in Unity Catalog.

Switch between publishing modes

Pipelines created in legacy publishing mode can opt-in to the new default publishing mode by updating the JSON configuration for the pipeline. You can revert pipelines to legacy publishing mode after enabling the new default behavior if necessary.

Property Behavior
target Configures the pipeline to use legacy publishing mode. Specify the name of the target schema as a string.
schema Configures the pipeline to use the default publishing mode, which supports updating materialized views and streaming tables in multiple schemas. Specify the name of the default schema as a string.

See Delta Live Tables properties reference.

Note

You do not need to update the catalog or storage properties used respectively by Unity Catalog and Hive metastore pipelines.

Update source code from LIVE schema

Pipelines configured to run with the new default publishing mode silently ignore the LIVE schema syntax. By default, all table reads use the catalog and schema specified in the pipeline configuration.

For most existing pipelines, this behavior change has no impact, as the legacy LIVE virtual schema behavior also directs reads to the catalog and schema specified in the pipeline configuration.

Important

Legacy code with reads that leverage the workspace default catalog and schema require code updates. Consider the following materialized view definition:

CREATE MATERIALIZED VIEW silver_table
AS SELECT * FROM raw_data

In legacy publishing mode, an unqualified read from the raw_data table uses the workspace default catalog and schema, for example, main.default.raw_data. In the new default pipeline mode, the catalog and schema used by default are those configured in the pipeline configuration. To ensure that this code continues to work as expected, update the reference to use the fully qualified identifier for the table, as in the following example:

CREATE MATERIALIZED VIEW silver_table
AS SELECT * FROM main.default.raw_data