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

public class View : MetricViewObjectBase, 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. Allocates a fresh MetricViewCollection<T> on each access because MetricViewCollection<T> is invariant — the same instance cannot satisfy both <Field> and <Dimension>. 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.

[Obsolete("Use Fields. Dimensions is the legacy name and will be removed in a future release.")]
public MetricViewCollection<Dimension> Dimensions { get; }

Property Value

Type Description
MetricViewCollection<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 override 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