admin管理员组文章数量:1124688
As part of report migration project from other technologies to PowerBi.
i am using Fabric Rest APIs ()
to create semantic layer in directQuery Mode.
And i am using below "model.bim" JSON configuration for connecting with database
but here i don't see any option to provide database username and password
so when i open this dataset from power bi service it gives popup like "The datasource is missing credentials and cannot be accessed"
now my requirement is somehow i need to pass database username and password along with model.bim JSON
so semantic layer will already get connected with database and we can create visual report directly
"partitions": [{
"name": "Applications",
"mode": "directQuery",
"source": {
"type": "m",
"expression": [
"let",
" Source = Sql.Database(\"xxx-xxxx..database.windows\", \"database_name\"),",
" dbo_Applications = Source{[Schema=\"dbo\",Item=\"country\"]}[Data]",
"in",
" dbo_Applications"
]
}
}
]
Image Link Click Here
As part of report migration project from other technologies to PowerBi.
i am using Fabric Rest APIs (https://learn.microsoft.com/en-us/rest/api/fabric/semanticmodel/items/create-semantic-model)
to create semantic layer in directQuery Mode.
And i am using below "model.bim" JSON configuration for connecting with database
but here i don't see any option to provide database username and password
so when i open this dataset from power bi service it gives popup like "The datasource is missing credentials and cannot be accessed"
now my requirement is somehow i need to pass database username and password along with model.bim JSON
so semantic layer will already get connected with database and we can create visual report directly
"partitions": [{
"name": "Applications",
"mode": "directQuery",
"source": {
"type": "m",
"expression": [
"let",
" Source = Sql.Database(\"xxx-xxxx..database.windows.net\", \"database_name\"),",
" dbo_Applications = Source{[Schema=\"dbo\",Item=\"country\"]}[Data]",
"in",
" dbo_Applications"
]
}
}
]
Image Link Click Here
Share Improve this question edited 2 days ago Umesh asked 2 days ago UmeshUmesh 12 bronze badges New contributor Umesh is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 1- Credentials are not stored in the model, they are set in the PBI Service. See github.com/microsoft/PowerBI-Developer-Samples/blob/master/… and data4v.com/… and learn.microsoft.com/en-us/power-bi/developer/embedded/… – Sam Nseir Commented 2 days ago
1 Answer
Reset to default 0Credentials are not stored in the model, they are set in the PBI Service.
See
https://github.com/microsoft/PowerBI-Developer-Samples/blob/master/PowerShell%20Scripts/Patch-SQL-Datasource-Credentials-and-Refresh.ps1
https://www.data4v.com/automated-updation-of-power-bi-data-source-credentials/
https://learn.microsoft.com/en-us/power-bi/developer/embedded/configure-credentials?tabs=sdk3
本文标签: powerbiWhile Creating Semantic Layer in directQuery Mode Need to attach with databaseStack Overflow
版权声明:本文标题:powerbi - While Creating Semantic Layer in directQuery Mode Need to attach with database - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736646204a1946111.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论