locked
Azure Data Factory Copy activity renames files a GUID at destination RRS feed

  • Question

  • I have files I have to move from an Azure VM to Azure Data Lake Gen 1.  I installed the Microsoft integration runtime on the VM and made a copy activity in data factory.  It looks like it works but when I look at the files in Azure Storage explorer the filenames look to be random guids??  Is there a setting to preserve filenames?

    It looks like data_07f5615dsssf5-ed054-4542-da1b8-3ef90c8d2fda0c.txt instead of something like "myfile.txt"


    • Edited by mschandler Tuesday, February 4, 2020 11:06 PM
    Tuesday, February 4, 2020 11:02 PM

Answers

  • I figured it out but am leaving this here in case others have the same issue.

    I had "Flatten Hierarchy" as my copy behavior activity on the sink side.  I changed it to none and all is good.

    

    • Marked as answer by mschandler Tuesday, February 4, 2020 11:08 PM
    Tuesday, February 4, 2020 11:08 PM

All replies

  • I figured it out but am leaving this here in case others have the same issue.

    I had "Flatten Hierarchy" as my copy behavior activity on the sink side.  I changed it to none and all is good.

    

    • Marked as answer by mschandler Tuesday, February 4, 2020 11:08 PM
    Tuesday, February 4, 2020 11:08 PM
  • Yes, that's given in document -  https://docs.microsoft.com/en-us/azure/data-factory/connector-file-system

    Copy behavior option - Defines the copy behavior when the source is files from a file-based data store.

    Allowed values are:
    - PreserveHierarchy (default): Preserves the file hierarchy in the target folder. The relative path of source file to source folder is identical to the relative path of target file to target folder.
    - FlattenHierarchy: All files from the source folder are in the first level of the target folder. The target files have autogenerated names.
    - MergeFiles: Merges all files from the source folder to one file. If the file name is specified, the merged file name is the specified name. Otherwise, it's an autogenerated file name.


    If the response helped, do "Mark as answer" and upvote it
    - Vaibhav

    Wednesday, February 5, 2020 4:02 AM