Nota:
El acceso a esta página requiere autorización. Puede intentar iniciar sesión o cambiar directorios.
El acceso a esta página requiere autorización. Puede intentar cambiar los directorios.
En este artículo se proporciona un desglose de la estructura de definición de los elementos de modelo semántico.
Formatos compatibles
Las definiciones de modelo semántico pueden usar TMDL o TMSL formato, pero no ambas al mismo tiempo.
De forma predeterminada, se usa el TMDL formato .
Elementos de definición
| Ruta de acceso del elemento de definición | tipo | Obligatorio | Descripción |
|---|---|---|---|
definition/ |
definition/ parts (TMDL) | true 1 | Definición tabular de Analysis Services mediante el formato TMDL . |
model.bim |
model.bim part (TMSL) | true 1 | Definición tabular de Analysis Services mediante el formato TMSL . |
diagramLayout.json |
diagramLayout.json parte | false | Contiene metadatos de diagrama del modelo semántico. |
definition.pbism |
elemento definition.pbism | verdadero | Contiene la configuración básica sobre el modelo semántico y la versión del formato de archivo. |
1 - La definition/ parte es necesaria para TMDL el formato, mientras model.bim que es necesario para TMSL el formato. Estos son mutuamente excluyentes: un modelo semántico usa un formato u otro, no ambos.
Obtenga más información sobre los archivos de definición de modelos semánticos en la documentación del proyecto de Power BI.
Ejemplo de carga con TMDL formato:
SemanticModel/
├── definition/
│ ├── tables/
│ │ ├── product.tmdl
│ │ ├── sales.tmdl
│ │ ├── calendar.tmdl
│ ├── relationships.tmdl
│ ├── model.tmdl
│ ├── database.tmdl
├── Copilot/
│ ├── Instructions/
│ │ ├── instructions.md
│ │ ├── version.json
│ ├── VerifiedAnswers/
│ ├── schema.json
│ ├── examplePrompts.json
│ ├── settings.json
│ └── version.json
├── diagramLayout.json
└── definition.pbism
{
"parts": [
{
"path": "definition/database.tmdl",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "definition/model.tmdl",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "definition/tables/product.tmdl",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "definition/tables/sales.tmdl",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
...
{
"path": "definition.pbism",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "diagramLayout.json",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
}
]
}
definition/part
Ejemplo de definition/ carpeta:
definition/
├── tables/
│ ├── product.tmdl
│ ├── sales.tmdl
│ ├── calendar.tmdl
├── relationships.tmdl
├── model.tmdl
├── database.tmdl
Ejemplo de tables/product.tmdl
table Product
measure '# Products' = COUNTROWS('Product')
formatString: #,##0
column Product
dataType: string
isDefaultLabel
summarizeBy: none
sourceColumn: Product
column ProductKey
dataType: int64
isHidden
isKey
summarizeBy: none
sourceColumn: ProductKey
column Category
dataType: string
summarizeBy: none
sourceColumn: Category
partition Product-171f48b3-e0ea-4ea3-b9a0-c8c673eb0648 = m
mode: import
source =
let
...
in
#"FinalStep"
elemento model.bim
Ejemplo de model.bim archivo:
{
"compatibilityLevel": 1702,
"model": {
"annotations": [],
"culture": "en-US",
"sourceQueryCulture": "en-US",
"cultures": [],
"dataAccessOptions": {
"legacyRedirects": true,
"returnErrorValuesAsNull": true
},
"defaultPowerBIDataSourceVersion": "powerBI_V3",
"discourageImplicitMeasures": true,
"expressions": [],
"functions": [],
"perspectives": [],
"relationships": [],
"roles": [],
"tables": [
{
"name": "Product",
"annotations": [],
"columns": [
{
"name": "Product",
"dataType": "string",
"isDefaultLabel": true,
"sourceColumn": "Product",
"summarizeBy": "none"
},
{
"name": "ProductKey",
"dataType": "int64",
"formatString": "0",
"isAvailableInMdx": false,
"isHidden": true,
"isKey": true,
"sourceColumn": "ProductKey",
"summarizeBy": "none"
}
,
{
"name": "Category",
"dataType": "string",
"sourceColumn": "Category",
"summarizeBy": "none"
}
],
"measures": [
{
"name": "# Products",
"expression": "COUNTROWS('Product')",
"formatString": "#,##0",
"lineageTag": "1f8f1a2a-06b6-4989-8af7-212719cf3617"
}
],
"partitions": [
{
"name": "Product-171f48b3-e0ea-4ea3-b9a0-c8c673eb0648",
"mode": "import",
"source": {
"expression": [
"let",
" ...",
"in",
" #\"FinalStep\""
],
"type": "m"
}
}
]
}
]
}
}
diagramLayout.json parte
Ejemplo de diagramLayout.json archivo:
{
"version": "1.1.0",
"diagrams": [
{
"ordinal": 0,
"scrollPosition": {
"x": 0,
"y": 74.883720930232556
},
"nodes": [
{
"location": {
"x": 942.5095849858792,
"y": 14.090768666666882
},
"nodeIndex": "[Table Name]",
"nodeLineageTag": "[Table Lineage Tag]",
"size": {
"height": 1000,
"width": 254
},
"zIndex": 5
},
{
"location": {
"x": 537.83428438628755,
"y": 836.33418866666739
},
"nodeIndex": "[Table Name]",
"nodeLineageTag": "[Table Lineage Tag]",
"size": {
"height": 481,
"width": 276
},
"zIndex": 2
}
],
"name": "All tables",
"zoomValue": 74.782608695652172,
"pinKeyFieldsToTop": false,
"showExtraHeaderInfo": false,
"hideKeyFieldsWhenCollapsed": false,
"tablesLocked": false
}
],
"selectedDiagram": "All tables",
"defaultDiagram": "All tables"
}
elemento definition.pbism
Ejemplo de definition.pbism archivo:
{
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/semanticModel/definitionProperties/1.0.0/schema.json",
"version": "5.0",
"settings": {
"qnaEnabled": false
}
}