SQL Server 正在重新格式化来自Azure Data Factory V2中的数据流的错误消息

v09wglhw  于 2023-02-15  发布在  其他
关注(0)|答案(1)|浏览(113)

我捕捉到错误消息,因为它来自我的每个活动的数据流。我的存储过程使用这个表达式@activity('Data flow1').error.Message来捕捉它,它显示如下:

Operation on target ForEach1 failed: Activity failed because an inner activity failed; Inner activity name: Copy data1, Error: ErrorCode=UserErrorInvalidColumnName,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The column Card PI is not found in target side,Source=Microsoft.DataTransfer.ClientLibrary,'

我只想获取“Message=The column Card PI is not found in target side”(消息=在目标端未找到卡片PI列),如何在azure中实现这一点?我可以尝试在SQL中解析和拆分字符串,但有些消息没有“Message=”(消息=),如下例所示

{"StatusCode":"DFExecutorUserError","Message":"Job failed due to reason: at Source 'source1': org.apache.hadoop.fs.FileAlreadyExistsException: GET https://saautouploaddev.dfs.core.windows.net/uploads?resource=filesystem&maxResults=5000&directory=Verified_Files/CSV&timeout=90&recursive=false\nStatusCode=409\nStatusDescription=This endpoint does not support BlobStorageEvents or SoftDelete. Please disable these account features if you would like to use this endpoint.\nErrorCode=EndpointUnsupportedAccountFeatures\nErrorMessage=This endpoint does not support BlobStorageEvents or SoftDelete. Please disable these account features if you would like to use this endpoint.\nRequestId:424fcdc3-b01f-0046-5f7e-b09ca7000000\nTime:2021-09-23T13:26:19.5585418Z","Details":"org.apache.hadoop.fs.FileAlreadyExistsException: GET https://saautouploaddev.dfs.core.windows.net/uploads?resource=filesystem&maxResults=5000&directory=Verified_Files/CSV&timeout=90&recursive=false\nStatusCode=409\nStatusDescription=This endpoint does not support BlobStorageEvents or SoftDelete. Please disable these account features if you would like to use this endpoint.\nErrorCode=EndpointUnsupportedAccountFeatures\nErrorMessage=This endpoint does not support BlobStorageEvents or SoftDelete. Please disable these account features if you would like to use this endpoint.\nRequestId:424fcdc3-b01f-0046-5f7e-b09ca7000000\nTime:2021-09-23T13:26:19.5585418Z\n\tat shaded.databricks.v20180920_b33d810.org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem.checkException(AzureBlobFileSystem.java:910)\n\tat shaded.databricks.v20180920_b33d810.org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem.listStatus(AzureBlobFileSystem.java:342)\n\tat org.apache.hadoop.fs.Globber.listStatus(Globber.java:69)\n\tat org.apache.hadoop.fs.Globber.glob(Globb"}
42fyovps

42fyovps1#

一整天都在纠结这个问题,下面是我的解决方案:@replace(json(活动(“数据流”).错误.消息).消息,'"','')
将错误消息转换为json,引用结果的Message部分,并删除双引号(“),将生成格式正确的字符串。

相关问题