在 SSIS 上配置 MDX 查询

2021-12-30 00:00:00 etl sql-server ssis ssas mdx

我在配置 SSIS 任务以运行 MDX 查询时遇到问题.解析工作正常,但它不允许我显示查询的不同列来映射它

Hi I am having troubles configuring the SSIS task to run an MDX query. The parse works fine but it doesn't allow me to display the different columns of the query to map it

这是我使用的查询:

SELECT [Measures].[# Consumers] ON 0,
      [Company].[Company Country Code].[Company Country Code].MEMBERS ON 1
FROM _CDM

抛出的错误是:

SQL 命令没有返回任何列信息

No Column information was returned by the SQL Command

错误快照

推荐答案

您可以在数据转换任务中使用 MDX Select 作为源.
两个重要的注意事项:

You can use MDX Select as a Source in Data Transformation Task.
Two important notes:

  • 使用 MS OLE DB Provider for Analysis Services,为您的 SSAS DB 配置它
  • 在 OLE DB Provider for AS 中,转到 All Properties 选项卡,选择 Advanced 部分并为 Extended 键入 Format=Tabular属性.
  • Use MS OLE DB Provider for Analysis Services, configure it for your SSAS DB
  • In OLE DB Provider for AS, go to All Properties Tab, select Advanced section and type Format=Tabular for Extended Properties.


在这种情况下,您可以在 OLE DB Source Editor 中输入您的 MDX 查询.
重要 - Preview 按钮可能不起作用,您应该检查切换到 Columns 选项卡的查询元数据.


In this case, at OLE DB Source Editor you can input your MDX query.
Important - Preview button might not work, you should check query metadata switching to Columns tab.

相关文章