Tables-Objekt (TMSL)
Gilt für: SQL Server 2016 und höher
Analysis Services Azure Analysis Services
Power BI Premium
Definiert die in einem Modell enthaltenen Tabellen. Tabellen in einem Modell sind entweder an Tabellen in einer externen Datenbank gebunden, aus der Daten importiert oder abgefragt werden, oder an eine berechnete Tabelle, die aus einem DAX-Ausdruck erstellt wurde. Innerhalb einer Tabelle beschreiben mindestens ein Partition-Objekt die Quelle der Daten. Zwischen Tabellen gibt ein Relationship-Objekt die Kardinalität, die Filterrichtung und andere Eigenschaften der Beziehung an.
Objektdefinition
Alle Objekte verfügen über einen gemeinsamen Satz von Eigenschaften, einschließlich Name, Typ, Beschreibung, eigenschaftensammlung und Anmerkungen. Tabellenobjekte verfügen auch über die folgenden Eigenschaften.
dataCategory
Gibt den Typ der Tabelle an, in der Regel nicht angegeben. Gültige Werte sind 0 – UNKNOWN, 1 – TIME, 2 – MEASURE, 3 – OTHER, 5 – QUANTITATIVE, 6- ACCOUNTS, 7 – CUSTOMERS, 8- PRODUCTS, 9 – SCENARIO, 10- UTILITY, 11 – CURRENCY, 12 – RATES, 13 – CHANNEL, 4 – PROMOTION, 15 - ORGANIZATION, 16 - BILL OF MATERIALS, 17 – GEOGRAPHY.
isHidden
Ein boolescher Wert, der angibt, ob die Tabelle von Clientvisualisierungstools als ausgeblendet behandelt wird.
TRUE, wenn die Tabelle als ausgeblendetes Element behandelt wird; andernfalls FALSE.
columns
Stellt eine Spalte in einer Tabelle dar. Es ist ein untergeordnetes Element eines Table-Objekts. Für jede Spalte ist eine Reihe von Eigenschaften definiert, die beeinflussen, wie Clientanwendungen die Daten in der Spalte visualisieren.
Measures
Stellt einen Wert dar, der auf Grundlage eines Ausdrucks berechnet wird. Es ist ein untergeordnetes Element eines Table-Objekts.
Hierarchien
Stellt eine Sammlung von Ebenen dar, die einen logischen hierarchischen Drilldownpfad für Clientanwendungen bereitstellen. Es ist ein untergeordnetes Element eines Table-Objekts.
Verwendung
Tabellenobjekte werden in den Befehlen Alter (TMSL),Create command (TMSL), CreateOrReplace command (TMSL), Delete command (TMSL), Refresh command (TMSL)) und MergePartitions command (TMSL) verwendet.
Geben Sie beim Erstellen, Ersetzen oder Ändern eines Tabellenobjekts alle Lese-/Schreibeigenschaften der Objektdefinition an. Das Auslassen einer Lese-/Schreibeigenschaft wird als Löschvorgang betrachtet.
Verkürzte Syntax
Tabellenobjektdefinitionen sind komplex. Diese Syntax reduziert innere Eigenschaften und Objekte, um Ihnen einen blick auf die Hauptteile zu geben.
"tables": {
"type": "array",
"items": {
"description": "Table object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"dataCategory": { },
"description": { },
"isHidden": { },
"partitions": { },
"annotations": { },
"columns": { },
"measures": { },
"hierarchies": { },
Vollständige Syntax
Im Folgenden finden Sie die Schemadarstellung eines Tabellenobjekts eines Modells. Um die Größe dieser Definition zu reduzieren, werden Partitionsobjekte an anderer Stelle beschrieben. Weitere Informationen finden Sie unter Partitions-Objekt (TMSL).
"tables": {
"type": "array",
"items": {
"description": "Table object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"dataCategory": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"isHidden": {
"type": "boolean"
},
"partitions": {
},
"columns": {
"type": "array",
"items": {
"anyOf": [
{
"description": "DataColumn object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"dataType": {
"enum": [
"automatic",
"string",
"int64",
"double",
"dateTime",
"decimal",
"boolean",
"binary",
"unknown",
"variant"
]
},
"dataCategory": {
"type": "string"
},
"description": {
"type": "string"
},
"isHidden": {
"type": "boolean"
},
"isUnique": {
"type": "boolean"
},
"isKey": {
"type": "boolean"
},
"isNullable": {
"type": "boolean"
},
"alignment": {
"enum": [
"default",
"left",
"right",
"center"
]
},
"tableDetailPosition": {
"type": "integer"
},
"isDefaultLabel": {
"type": "boolean"
},
"isDefaultImage": {
"type": "boolean"
},
"summarizeBy": {
"enum": [
"default",
"none",
"sum",
"min",
"max",
"count",
"average",
"distinctCount"
]
},
"type": {
"enum": [
"data",
"calculated",
"rowNumber",
"calculatedTableColumn"
]
},
"formatString": {
"type": "string"
},
"isAvailableInMdx": {
"type": "boolean"
},
"keepUniqueRows": {
"type": "boolean"
},
"displayOrdinal": {
"type": "integer"
},
"sourceProviderType": {
"type": "string"
},
"displayFolder": {
"type": "string"
},
"sourceColumn": {
"type": "string"
},
"sortByColumn": {
"type": "string"
},
"annotations": {
"type": "array",
"items": {
"description": "Annotation object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
{
"description": "CalculatedTableColumn object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"dataType": {
"enum": [
"automatic",
"string",
"int64",
"double",
"dateTime",
"decimal",
"boolean",
"binary",
"unknown",
"variant"
]
},
"dataCategory": {
"type": "string"
},
"description": {
"type": "string"
},
"isHidden": {
"type": "boolean"
},
"isUnique": {
"type": "boolean"
},
"isKey": {
"type": "boolean"
},
"isNullable": {
"type": "boolean"
},
"alignment": {
"enum": [
"default",
"left",
"right",
"center"
]
},
"tableDetailPosition": {
"type": "integer"
},
"isDefaultLabel": {
"type": "boolean"
},
"isDefaultImage": {
"type": "boolean"
},
"summarizeBy": {
"enum": [
"default",
"none",
"sum",
"min",
"max",
"count",
"average",
"distinctCount"
]
},
"type": {
"enum": [
"data",
"calculated",
"rowNumber",
"calculatedTableColumn"
]
},
"formatString": {
"type": "string"
},
"isAvailableInMdx": {
"type": "boolean"
},
"keepUniqueRows": {
"type": "boolean"
},
"displayOrdinal": {
"type": "integer"
},
"sourceProviderType": {
"type": "string"
},
"displayFolder": {
"type": "string"
},
"isNameInferred": {
"type": "boolean"
},
"isDataTypeInferred": {
"type": "boolean"
},
"sourceColumn": {
"type": "string"
},
"sortByColumn": {
"type": "string"
},
"columnOriginTable": {
"type": "string"
},
"columnOriginColumn": {
"type": "string"
},
"annotations": {
"type": "array",
"items": {
"description": "Annotation object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
{
"description": "CalculatedColumn object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"dataType": {
"enum": [
"automatic",
"string",
"int64",
"double",
"dateTime",
"decimal",
"boolean",
"binary",
"unknown",
"variant"
]
},
"dataCategory": {
"type": "string"
},
"description": {
"type": "string"
},
"isHidden": {
"type": "boolean"
},
"isUnique": {
"type": "boolean"
},
"isKey": {
"type": "boolean"
},
"isNullable": {
"type": "boolean"
},
"alignment": {
"enum": [
"default",
"left",
"right",
"center"
]
},
"tableDetailPosition": {
"type": "integer"
},
"isDefaultLabel": {
"type": "boolean"
},
"isDefaultImage": {
"type": "boolean"
},
"summarizeBy": {
"enum": [
"default",
"none",
"sum",
"min",
"max",
"count",
"average",
"distinctCount"
]
},
"type": {
"enum": [
"data",
"calculated",
"rowNumber",
"calculatedTableColumn"
]
},
"formatString": {
"type": "string"
},
"isAvailableInMdx": {
"type": "boolean"
},
"keepUniqueRows": {
"type": "boolean"
},
"displayOrdinal": {
"type": "integer"
},
"sourceProviderType": {
"type": "string"
},
"displayFolder": {
"type": "string"
},
"isDataTypeInferred": {
"type": "boolean"
},
"expression": {
"type": "string"
},
"sortByColumn": {
"type": "string"
},
"annotations": {
"type": "array",
"items": {
"description": "Annotation object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
]
}
},
"measures": {
"type": "array",
"items": {
"description": "Measure object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"expression": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"formatString": {
"type": "string"
},
"isHidden": {
"type": "boolean"
},
"isSimpleMeasure": {
"type": "boolean"
},
"displayFolder": {
"type": "string"
},
"kpi": {
"description": "KPI object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"targetDescription": {
"type": "string"
},
"targetExpression": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"targetFormatString": {
"type": "string"
},
"statusGraphic": {
"type": "string"
},
"statusDescription": {
"type": "string"
},
"statusExpression": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"trendGraphic": {
"type": "string"
},
"trendDescription": {
"type": "string"
},
"trendExpression": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"annotations": {
"type": "array",
"items": {
"description": "Annotation object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"annotations": {
"type": "array",
"items": {
"description": "Annotation object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"hierarchies": {
"type": "array",
"items": {
"description": "Hierarchy object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"isHidden": {
"type": "boolean"
},
"displayFolder": {
"type": "string"
},
"annotations": {
"type": "array",
"items": {
"description": "Annotation object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false
}
},
"levels": {
"type": "array",
"items": {
"description": "Level object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"ordinal": {
"type": "integer"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"column": {
"type": "string"
},
"annotations": {
"type": "array",
"items": {
"description": "Annotation object of Tabular Object Model (TOM)",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
}