Power BI PPU环境创建表时遇数据源未找到错误求助
PPU环境下使用TOM创建带Columns的表触发数据源凭据错误的原因
针对你遇到的问题,结合PPU(Premium Per User)环境特性和TOM操作逻辑,可能的原因如下:
数据源凭据同步延迟:当显式定义
Columns集合时,TOM会立即触发数据源连接验证和元数据拉取操作。但PPU服务端对新创建的数据源凭据可能存在同步延迟,导致系统无法找到对应的数据源信息。而注释Columns后,仅完成表结构的创建,不会触发即时的数据源验证,因此无报错。数据源引用的上下文不匹配:代码中
dbWithDataSource.Model.DataSources[dataSource]的数据源引用方式,在PPU环境下可能无法正确关联到服务端已存储的凭据记录。PPU对数据源的标识(如内部ID)存储逻辑与普通Power BI环境不同,显式指定列后,系统需要精准匹配凭据,但当前引用的数据源对象未完成服务端的上下文绑定。PPU权限限制:PPU测试许可证的权限集可能未包含“读取数据源元数据”的精细化权限。创建包含
Columns的表时,TOM需要读取数据源的元数据来验证列映射,而该操作被权限限制;注释Columns时仅创建空表,无需该权限,因此可执行成功。
错误信息
{"error":{"code": "Premium_ASWL_Error", "pbi. error":{"code": "Premium_ASWL_Error", "parameters":{}, "details":[{"code": "Premium_ASWL_Error_Details_Label", "detail":{"type":1, "value": "An unexpected internal error happened while obtaining the credentials for the data source '<ccon>13</ccon>': data source information is not found in Power BI service."}}]}}
相关代码
dbWithDataSource.Model.Tables.Add(new Table() { Name = dbWithDataSource.Model.Tables.GetNewName("Individual Customers"), Description = "Individual customers (names and email addresses) that purchase Adventure Works Cycles products online.", Partitions = { new Microsoft.AnalysisServices.Tabular.Partition() { Name = "All Customers", Source = new QueryPartitionSource() { DataSource = dbWithDataSource.Model.DataSources[dataSource], Query = @"SELECT [city], [street] FROM [xyz].[building]" } } }, Columns = { new DataColumn() { Name = "Column1", DataType = Microsoft.AnalysisServices.Tabular.DataType.String, SourceColumn = "city", }, new DataColumn() { Name = "Column2", DataType = Microsoft.AnalysisServices.Tabular.DataType.String, SourceColumn = "street", } } });
内容的提问来源于stack exchange,提问作者Tored
相关产品推荐
相关产品推荐

