ADF Copy Activity Sink with Metadata field not handling accented characters

D Williams 76 Reputation points
2024-01-23T13:21:58.91+00:00

Hi All I have a ADF Copy Activity where I have defined several metadata fields in the Sink tab for my output file. The output filename created by the Copy activity has accented characters in its name for example: Jonsins Blobs statión Full Listing.csv one of the metadata fields I have created has the above filename as its value.

it seems that when the metadata field contains the accented filename. The file is copied to the storage account, but the copy activity falls over with the error below:

ErrorCode=AdlsGen2OperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ADLS Gen2 operation failed for: Operation returned an invalid status code 'BadRequest'. Account: 'dev'. FileSystem: 'test'. Path: 'landing/Jonsins Blobs statión Full Listing.csv'. ErrorCode: 'InvalidPropertyName'. Message: 'The property name contains invalid characters.'. RequestId: '87d67001-b01f-0097-6efe-41eaf0000000'. TimeStamp: 'Thu, 18 Jan 2024 09:53:22 GMT'..,Source=Microsoft.DataTransfer.ClientLibrary,''Type=Microsoft.Azure.Storage.Data.Models.ErrorSchemaException,Message=Operation returned an invalid status code 'BadRequest',Source=Microsoft.DataTransfer.ClientLibrary,'

Is there a way to have the accented filename saved as a metadata field

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,199 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Harishga 5,985 Reputation points Microsoft Vendor
    2024-01-24T11:08:11.8366667+00:00

    Hi @D Williams
    Welcome to Microsoft Q&A platform and thanks for posting your question here.

    Based on the error message you provided, it seems that the copy activity is failing because the metadata field contains an invalid property name due to the accented characters in the filename. The error message specifically states that "The property name contains invalid characters."

    To resolve this issue, you can try removing the accented characters from the metadata field value or replacing them with non-accented characters. This should allow the copy activity to complete successfully without encountering the "InvalidPropertyName" error.

    Alternatively, you can try encoding the accented characters in the metadata field value using URL encoding or UTF-8 encoding. This may allow the copy activity to recognize the metadata field value as a valid property name.
    Reference
    https://learn.microsoft.com/en-us/dotnet/api/system.web.httputility.urlencode?view=net-8.0#system-web-httputility-urlencode(system-string-system-text-encoding)

     I hope this helps! Let me know if you have any other questions.