在SSAS中,当我们从Visual Studio手动处理维度时,可以选择忽略维度键错误。但是我没有在XMLA脚本中看到相同的内容,尽管有很多binging和谷歌搜索。如果有可能,请帮忙。
答案 0 :(得分:1)
XMLA脚本只提及要使用选项处理的维度/事实/数据库。休息多维数据集的所有设置(例如:忽略重复键)是从多维数据集本身继承的。因此,如果您在SSAS多维数据集中设置了这些属性,那么它将得到处理。 但是,您可以单独处理每个维度以通过XMLA避免其他与关键相关的问题,但它不是直接的,您必须获取每个维度的XMLA脚本Ex:
<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<Parallel>
<Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
<Object>
<DatabaseID>Database_Name</DatabaseID>
<DimensionID>Dimension_Name</DimensionID>
</Object>
<Type>ProcessFull</Type>
<WriteBackTableCreation>UseExisting</WriteBackTableCreation>
</Process>
</Parallel>
</Batch>
基本上,您可以避免SSAS多维数据集本身的维度键错误。例如,如果表中包含NULL和空白,则会出现重复错误。
<强>更新强>
然后点击尺寸键错误标签并设置所需的值
您会注意到,现在您的XMLA将具有 ErrorConfiguration 节点,其中包含您选择的值。
XMLA - ReportAndStop
<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<ErrorConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
<KeyErrorLimit>2</KeyErrorLimit>
<KeyErrorLimitAction>StopLogging</KeyErrorLimitAction>
<KeyNotFound>ReportAndStop</KeyNotFound>
<KeyDuplicate>ReportAndStop</KeyDuplicate>
<NullKeyConvertedToUnknown>ReportAndStop</NullKeyConvertedToUnknown>
<NullKeyNotAllowed>ReportAndStop</NullKeyNotAllowed>
</ErrorConfiguration>
<Parallel>
<Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
<Object>
<DatabaseID>Database_Name</DatabaseID>
</Object>
<Type>ProcessFull</Type>
<WriteBackTableCreation>UseExisting</WriteBackTableCreation>
</Process>
</Parallel>
</Batch>
您也可以通过将所有默认值更改为其他值来生成相同的内容,一旦获得XMLA,然后为其提供所需的值。
答案 1 :(得分:0)