Class View
- Inheritance
-
View
- Implements
-
- Inherited Members
-
Represents a Databricks Metric View definition. The root of the
metric view object graph: unlike the child objects (joins, fields,
measures) it does not derive from MetricViewObjectBase
-- it has no name in the Metric View spec (the view's name lives in
Unity Catalog, outside the YAML) and cannot be deleted from anything.
The surface shared with child objects is expressed through
IMetricViewObject.
public class View : IMetricViewObject
- Extension Methods
-
Properties
Description of the metric view. Requires version 1.1+.
[MinVersion("1.1")]
public string? Comment { get; set; }
Property Value
Legacy name for Fields. A live, read-only view over
the same underlying collection: no items are copied, no separate
collection is maintained, and every read defers to
Fields and casts. The cast to Dimension
is safe because TabularEditor.SemanticBridge.Platforms.Databricks.MetricView.View.NewField(System.String,System.String) constructs every field as a
Dimension at runtime. Item references are the same
instances stored in Fields, so mutations through
either surface are visible through the other, and later additions or
removals are reflected immediately.
[Obsolete("Use Fields. Dimensions is the legacy name and will be removed in a future release.")]
public IMetricViewCollection<Dimension> Dimensions { get; }
Property Value
Array of field definitions
public MetricViewCollection<Field> Fields { get; }
Property Value
Optional SQL boolean expression that applies to all queries; a WHERE
public string? Filter { get; set; }
Property Value
Optional join definitions for the metric view
public MetricViewCollection<Join> Joins { get; }
Property Value
Materialization configuration for query acceleration. Requires version 1.1+.
This is an experimental feature.
[MinVersion("1.1")]
public Materialization? Materialization { get; set; }
Property Value
Array of measure definitions
public MetricViewCollection<Measure> Measures { get; }
Property Value
public string Path { get; }
Property Value
The source data for the metric view, playing the role of a single fact
public required string Source { get; set; }
Property Value
Version of the metric view specification
public required string Version { get; set; }
Property Value
Methods
Legacy name for AddField(string, string). The returned reference is
typed as Dimension so call sites that assign to a
Dimension-typed local continue to compile; the underlying
instance is the same one stored in Fields.
[Obsolete("Use AddField. AddDimension is the legacy name and will be removed in a future release.")]
public Dimension AddDimension(string name, string expr)
Parameters
Returns
Adds a new field to the metric view
public Field AddField(string name, string expr)
Parameters
Returns
Adds a new join to the metric view
public Join AddJoin(string name, string source)
Parameters
Returns
Adds a new join to the metric view with parentName as the parent join
public Join AddJoin(string parentName, string name, string source)
Parameters
Returns
Adds a new measure to the metric view
public Measure AddMeasure(string name, string expr)
Parameters
Returns
public override string ToString()
Returns