SQL 存储过程的 SSAS 维度安全性未显示所有数据
我基于 .NET 程序集实现了 SSAS 维度安全性,该程序集调用存储过程,使用 USER 作为表达式将其设置为允许的维度集。
我在两个维度上实现了这种安全性。
就像任务和项目
我有两个事实表,一个与任务相关,另一个与项目相关
所有这一切都很简单,棘手的部分是任务与项目相关,任务维度与项目事实表相关,但不是所有项目都必须有相关的任务。
任务也与项目相关,因此任务维度跨越项目事实表。
这一切都有效,但在测试时我注意到返回的数据并不是用户应该访问的所有数据,因此我构建了一个日志表来记录 .net 程序集将返回的集、访问多维数据集的用户以及用户有权访问的成员数量。
我测试了它,日志表注册正确:
User Rows SET
UserA 103 {....}
但是只有 20 行显示数据。
当我删除 MDX 的 NON EMPTY 子句时,所有行都出现了,但是 NULL 的值
我挖掘了一下,发现问题出在与事实表交叉的维度上,当我删除那些提到的交叉时,所有数据都被显示出来。
提前致谢。 加布里埃尔·吉马良斯
I implemented SSAS dimension security based on a .NET assembly that calls a Stored Procedure setting it to the allowed dimension set, using the USER as an expression.
I implemented this security on two dimensions.
it's something like Tasks and Projects
I have two fact tables one related to tasks and other related to Projects
All that would be simple, the tricky part is that tasks are related to projects, and the tasks dimension relates to the projects fact table, however not all projects must have a task related.
Tasks are also related to projects so the tasks dimension cross the projects fact table.
This all works but when testing I noticed the data returned is not all the data the user should have access to, so I built up a Log table that logged the set that the .net assembly would return, the user who's accessing the cube and the number of members the user have access to.
I tested it and the log table register correctly:
User Rows SET
UserA 103 {....}
However only 20 rows of data are displayed.
When I removed the NON EMPTY clause of the MDX all the rows appeared, however the values where NULL
I digged out a little and found out that the issue was on the dimension crossing the fact table, when I removed those mentioned crossings all data was revealed.
Thanks in advance.
Gabriel Guimarães
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来好像一切都按设计工作......这是 NON EMPTY 的正确行为......这就像为 WHERE xxx IS NOT NULL 添加过滤器。
或者您是说删除 NON EMPTY 子句后应该在某些值中看到空值?
Sounds like everything is working as designed...that is the correct behavior for NON EMPTY...it's like adding a filter for WHERE xxx IS NOT NULL.
Or are you saying there should be values where you see nulls after removing the NON EMPTY clause?