Data Model
The DataModel sub-graph describes the semantic layer — tables, columns, their relationships, and the expressions (platform formula language, SQL) that define computed objects.
DataModel
public class DataModel
{
public ICollection<Table> Tables { get; set; }
public ICollection<Relationship> Relationships { get; set; }
public ICollection<AdditionalMetadata>? AdditionalMetadata { get; set; }
}
Table
A table in the semantic model. Can be a physical table loaded from a data source, or a calculated/virtual object.
public class Table
{
public const string TableTypeTable = "Table";
public const string TableTypeObject = "Object";
public string Id { get; set; }
public string? Type { get; set; }
public string Name { get; set; }
public Expression? Expression { get; set; }
public ICollection<Column> Columns { get; set; }
public ICollection<AdditionalMetadata>? AdditionalMetadata { get; set; }
}
| Property | Type | Description |
|---|---|---|
Id |
string |
Unique table identifier |
Type |
string? |
"Table" for standard tables; "Object" for virtual/calculated objects |
Name |
string |
Display name used in formulas and UI |
Expression |
Expression? |
Source expression (native query, SQL, or platform formula) |
Columns |
ICollection<Column> |
All columns and measures in this table |
AdditionalMetadata |
ICollection<AdditionalMetadata>? |
Platform-specific extras |
Column
A column or measure within a table.
public class Column
{
public string Id { get; set; }
public string? Type { get; set; }
public string Name { get; set; }
public string? Description { get; set; }
public ColumnDataType DataType { get; set; }
public string? SummarizeBy { get; set; }
public Expression? Expression { get; set; }
public string? FormatString { get; set; }
public string? DataCategory { get; set; }
public bool IsKey { get; set; }
public bool IsUnique { get; set; }
public bool IsNullable { get; set; }
public bool IsDimension { get; set; }
public bool IsMeasure { get; set; }
public ICollection<ColumnsReference> ColumnsReferences { get; set; }
public ICollection<AdditionalMetadata>? AdditionalMetadata { get; set; }
}
| Property | Type | Description |
|---|---|---|
Id |
string |
Unique column identifier |
Type |
string? |
Column kind (e.g. "calculated", "data", "measure") |
Name |
string |
Column / measure display name |
Description |
string? |
Optional description |
DataType |
ColumnDataType |
Normalized data type (see below) |
SummarizeBy |
string? |
Default aggregation hint (e.g. "Sum", "Average", "None") |
Expression |
Expression? |
Formula for calculated columns and measures |
FormatString |
string? |
Display format string (e.g. "#,0.00", "dd/MM/yyyy") |
DataCategory |
string? |
Semantic category hint (e.g. "Country", "Latitude") |
IsKey |
bool |
Whether this is the table's primary key column |
IsUnique |
bool |
Whether values are unique (no duplicates) |
IsNullable |
bool |
Whether null values are allowed |
IsDimension |
bool |
Marks this as a dimension field (used for grouping/filtering) |
IsMeasure |
bool |
Marks this as an aggregated measure |
ColumnsReferences |
ICollection<ColumnsReference> |
Other columns this column references in its expression |
AdditionalMetadata |
ICollection<AdditionalMetadata>? |
Platform-specific extras |
ColumnDataType
Relationship
A join between two columns in different tables.
public class Relationship
{
public string? Name { get; set; }
public string IdColumnFrom { get; set; }
public string IdColumnTo { get; set; }
public RelationshipDirection Type { get; set; }
public Expression? Expression { get; set; }
public ICollection<AdditionalMetadata>? AdditionalMetadata { get; set; }
}
| Property | Type | Description |
|---|---|---|
Name |
string? |
Optional relationship name |
IdColumnFrom |
string |
Source column ID (the "many" side in a one-to-many) |
IdColumnTo |
string |
Target column ID (the "one" side) |
Type |
RelationshipDirection |
Cardinality direction |
Expression |
Expression? |
Custom join expression (if platform supports it) |
AdditionalMetadata |
ICollection<AdditionalMetadata>? |
Platform-specific extras |
RelationshipDirection
Expression
Represents a formula or query in any language supported by the platform.
public class Expression
{
public string Id { get; set; }
public string? Type { get; set; }
public string? Language { get; set; }
public string Code { get; set; }
public ICollection<AdditionalMetadata>? AdditionalMetadata { get; set; }
}
| Property | Type | Description |
|---|---|---|
Id |
string |
Unique expression identifier |
Type |
string? |
Expression kind (e.g. "measure", "calculated", "query") |
Language |
string? |
Formula language: "DAX", "MDX", "SQL", etc. |
Code |
string |
The actual formula / query text |
AdditionalMetadata |
ICollection<AdditionalMetadata>? |
Platform-specific extras |
Expression appears on: Column, Table, Relationship, Filter, VisualProjection.
ColumnsReference
Records a dependency between columns — column A references column B in its expression.