Forum Discussion
Anonymous
1 year agoNot applicable
Power BI Fabric - Create semantic model with via Microsoft Fabric API
Hi Everyone, I’m currently exploring the Microsoft Fabric API, specifically the Items - Create Semantic Model REST API (SemanticModel) as detailed on Microsoft Learn. Items - Create Semantic Mode...
- 1 year ago
The error "Invalid platform file" indicates an issue with the .platform part you supplied. How did you get this file? Did you construct is manually? There's a schema for this file, and what you've sent probably doesn't conform to that schema.
You can try creating without this part if you don't know how to construct it.
ddelapasse
Helper I
1 year agoHere's a tiny one I used for testing. I created one in PBI first and exported to pbip.
{
"name": "UploadedSMTest",
"compatibilityLevel": 1550,
"model": {
"culture": "en-US",
"dataAccessOptions": {
"legacyRedirects": true,
"returnErrorValuesAsNull": true
},
"defaultPowerBIDataSourceVersion": "powerBI_V3",
"sourceQueryCulture": "en-US",
"tables": [{
"name": "Applications",
"lineageTag": "c549ffef-c9e8-4320-a6c7-1ad879c6f368",
"columns": [{
"name": "Id",
"dataType": "string",
"isNullable": false,
"sourceColumn": "Id",
"sourceProviderType": "uniqueidentifier",
"lineageTag": "26c50fc8-c33e-4719-8a9e-bc82ba1cfb48",
"summarizeBy": "none",
"annotations": [{
"name": "SummarizationSetBy",
"value": "Automatic"
}
]
}, {
"name": "Name",
"dataType": "string",
"isNullable": false,
"sourceColumn": "Name",
"sourceProviderType": "nvarchar(450)",
"lineageTag": "eb2102dc-9c35-4bdd-a577-86ca938c63c2",
"summarizeBy": "none",
"annotations": [{
"name": "SummarizationSetBy",
"value": "Automatic"
}
]
}, {
"name": "Ordinal",
"dataType": "int64",
"isNullable": false,
"sourceColumn": "Ordinal",
"formatString": "0",
"sourceProviderType": "int",
"lineageTag": "0a30dc9f-2112-44ca-87f7-229acfd33254",
"summarizeBy": "sum",
"annotations": [{
"name": "SummarizationSetBy",
"value": "Automatic"
}
]
}, {
"name": "Logo",
"dataType": "string",
"sourceColumn": "Logo",
"sourceProviderType": "nvarchar(max)",
"lineageTag": "5ba19601-51ab-44c8-9446-82f31187ddfe",
"summarizeBy": "none",
"annotations": [{
"name": "SummarizationSetBy",
"value": "Automatic"
}
]
}, {
"name": "FileName",
"dataType": "string",
"sourceColumn": "FileName",
"sourceProviderType": "nvarchar(max)",
"lineageTag": "3d6b9fc3-163a-4760-8ea5-08c737fd7d7d",
"summarizeBy": "none",
"annotations": [{
"name": "SummarizationSetBy",
"value": "Automatic"
}
]
}, {
"name": "IsActive",
"dataType": "boolean",
"isNullable": false,
"sourceColumn": "IsActive",
"formatString": "\"TRUE\";\"TRUE\";\"FALSE\"",
"sourceProviderType": "bit",
"lineageTag": "33149fb3-d533-4eff-8bad-911b5ab6a54b",
"summarizeBy": "none",
"annotations": [{
"name": "SummarizationSetBy",
"value": "Automatic"
}
]
}
],
"partitions": [{
"name": "Applications",
"mode": "directQuery",
"source": {
"type": "m",
"expression": [
"let",
" Source = Sql.Database(\"xxxx-sql.database.windows.net\", \"yyyy\"),",
" dbo_Applications = Source{[Schema=\"dbo\",Item=\"Applications\"]}[Data]",
"in",
" dbo_Applications"
]
}
}
],
"annotations": [{
"name": "PBI_ResultType",
"value": "Table"
}
]
}
],
"cultures": [{
"name": "en-US",
"linguisticMetadata": {
"content": {
"Version": "1.0.0",
"Language": "en-US"
},
"contentType": "json"
}
}
],
"annotations": [{
"name": "PBI_QueryOrder",
"value": "[\"Applications\"]"
}, {
"name": "__PBI_TimeIntelligenceEnabled",
"value": "1"
}, {
"name": "PBIDesktopVersion",
"value": "2.137.1102.0 (24.10)"
}, {
"name": "PBI_ProTooling",
"value": "[\"DevMode\"]"
}, {
"name": "TabularEditor_SerializeOptions",
"value": "{\"IgnoreInferredObjects\":true,\"IgnoreInferredProperties\":true,\"IgnoreTimestamps\":true,\"SplitMultilineStrings\":true,\"PrefixFilenames\":false,\"LocalTranslations\":false,\"LocalPerspectives\":false,\"LocalRelationships\":false,\"Levels\":[\"Data Sources\",\"Shared Expressions\",\"Perspectives\",\"Relationships\",\"Roles\",\"Tables\",\"Tables/Columns\",\"Tables/Hierarchies\",\"Tables/Measures\",\"Tables/Partitions\",\"Tables/Calculation Items\",\"Translations\"]}"
}, {
"name": "__TEdtr",
"value": "1"
}
]
}
}UmeshGoti
Helper I
1 year agoddelapasse can you please let us know how we can specify relationships when we have more than once tables for above JSON
Thanks in advance !!