Table of Contents

Class View

Inheritance
View
Implements
Inherited Members
Namespace
TabularEditor.SemanticBridge.Platforms.Databricks.MetricView
Assembly
SemanticBridge.dll

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

Comment

Description of the metric view. Requires version 1.1+.

[MinVersion("1.1")]
public string? Comment { get; set; }

Property Value

Type Description
string

Dimensions

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

Type Description
IMetricViewCollection<Dimension>

Fields

Array of field definitions

public MetricViewCollection<Field> Fields { get; }

Property Value

Type Description
MetricViewCollection<Field>

Filter

Optional SQL boolean expression that applies to all queries; a WHERE

public string? Filter { get; set; }

Property Value

Type Description
string

Joins

Optional join definitions for the metric view

public MetricViewCollection<Join> Joins { get; }

Property Value

Type Description
MetricViewCollection<Join>

Remarks

A join is also the place where dimension sources are defined; this information exists nowhere else.

Materialization

Materialization configuration for query acceleration. Requires version 1.1+. This is an experimental feature.

[MinVersion("1.1")]
public Materialization? Materialization { get; set; }

Property Value

Type Description
Materialization

Measures

Array of measure definitions

public MetricViewCollection<Measure> Measures { get; }

Property Value

Type Description
MetricViewCollection<Measure>

Path

public string Path { get; }

Property Value

Type Description
string

Source

The source data for the metric view, playing the role of a single fact

public required string Source { get; set; }

Property Value

Type Description
string

Version

Version of the metric view specification

public required string Version { get; set; }

Property Value

Type Description
string

Methods

AddDimension(string, string)

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

Type Name Description
string name
string expr

Returns

Type Description
Dimension

AddField(string, string)

Adds a new field to the metric view

public Field AddField(string name, string expr)

Parameters

Type Name Description
string name
string expr

Returns

Type Description
Field

AddJoin(string, string)

Adds a new join to the metric view

public Join AddJoin(string name, string source)

Parameters

Type Name Description
string name
string source

Returns

Type Description
Join

AddJoin(string, string, string)

Adds a new join to the metric view with parentName as the parent join

public Join AddJoin(string parentName, string name, string source)

Parameters

Type Name Description
string parentName
string name
string source

Returns

Type Description
Join

AddMeasure(string, string)

Adds a new measure to the metric view

public Measure AddMeasure(string name, string expr)

Parameters

Type Name Description
string name
string expr

Returns

Type Description
Measure

ToString()

public override string ToString()

Returns

Type Description
string