简体   繁体   English

Azure数据工厂V2:SAP BW上的MDX查询Microsoft.DataTransfer.Common.Shared.HybridDeliveryException

[英]Azure Data Factory V2: MDX Query on SAP BW exception Microsoft.DataTransfer.Common.Shared.HybridDeliveryException

I am trying to fetch data from SAP BW system into Azure Data Lake using MDX Query in SAP BW connector. 我正在尝试使用SAP BW连接器中的MDX查询将数据从SAP BW系统提取到Azure数据湖中。 But I am getting exception message in Azure is following : 但是我在Azure中收到以下异常消息:

{
    "errorCode": "2200",
    "message": "Failure happened on 'Source' side. ErrorCode=UserErrorInvalidDataValue,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Column '[Measures].[SomeMeasure]' contains an invalid value '4.000-2'. Cannot convert '4.000-2' to type 'Decimal'.,Source=Microsoft.DataTransfer.Common,''Type=System.InvalidCastException,Message=Specified cast is not valid.,Source=Microsoft.DataTransfer.Common,'",
    "failureType": "UserError",
    "target": "Copy1"
}

From the error, I can understand there are some values in Measures which is not actually numeric value. 从错误中,我可以了解到Measurements中有些值实际上不是数字值。 Changing or correcting value in the SAP system is not in my scope. 在SAP系统中更改或校正值不在我的范围内。 Is there any option in the Data Factory V2 for SAP BW connection so that I can define the data type of the Measure for input and/or output. 用于SAP BW的Data Factory V2中是否有任何选项,以便我可以为输入和/或输出定义度量的数据类型。 or there is any fine-tuning in the MDX query so that I can fetch the data without any error? 还是在MDX查询中进行了任何微调,以便我可以正确地获取数据?

This is my MDX Query : 这是我的MDX查询:

SELECT 
{[Measures].[SomeMeasure]}  ON COLUMNS,
NON EMPTY
{ [0COMP_CODE].[LEVEL01].MEMBERS *
[0COSTELMNT].[LEVEL01].MEMBERS }
ON ROWS
FROM SomeQube
  WHERE {[0FISCPER].[K42015008]}

If you could skip that incorrect rows, you could set enableSkipIncompatibleRow in as true. 如果您可以跳过不正确的行,则可以将enableSkipIncompatibleRow设置为true。 Please reference this do c. 请参考此做 c。

Your filter is incorrect. 您的过滤器不正确。 SAP 0FISCPER dimension is in YYYYMMM format. SAP 0FISCPER维度为YYYYMMM格式。 You need to enter WHERE {[0FISCPER].[2015008]}. 您需要输入WHERE {[0FISCPER]。[2015008]}。 I am almost certain the "K4" you entered there is your fiscal year variant, which you should not put there. 我几乎可以肯定,您输入的“ K4”是您会计年度的变式,您不应该在此输入。 Objects like this K4 are called compounding infoobject (which your fiscal year/period belongs to if you envision it as hierarchical parent/child structure). 像K4这样的对象称为复合信息对象(如果您将其设想为层次化父级/子级结构,则会计年度/期间属于该对象)。 But in this specific case, you don't need to specify fiscal year variant. 但是在这种特定情况下,您无需指定会计年度变式。 Just remove K4. 只需移除K4。

I highly advise against skipping "incorrect rows". 我强烈建议不要跳过“不正确的行”。 My guidance to you is that you should always fail the job whenever exception happens and investigate the data quality issue. 我对您的指导是,无论何时发生异常,您都应始终使工作失败,并调查数据质量问题。 Do not ever put enterprise data integrity at risk. 永远不要将企业数据完整性置于危险之中。 SAP data has to be 100% accurate, not 99.9999%. SAP数据必须是100%准确,而不是99.9999%。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM