简体   繁体   中英

Azure DataFactory copy job copies extension in the name of the destination file

In Azure Datafactory I copy zipped files from one server and unzip them inside another server. The source file has the following name and extension "sourcefile.zip" with '.zip' not being in the name and actually the extension (checked it with the option hide extensions in file explorer). When the copy job is finished The folder gets decompressed but keeps the '.zip' in the name but is not a zipped folder.

Inside my job file I do a copy job from the dataset of the source server and get the "@item" that is given by the foreach loop and concatenate the ".zip" in the wildcardfileName to capture the actual zip file. because the foreach does not give me the full name of the file and if I don't mention the ".zip" inside the wildcard I get the error Could not find file

   {
                        "name": "CopyDataToFileServer",
                        "type": "Copy",
                        "dependsOn": [
                            {
                                "activity": "CopyDataToIRserver",
                                "dependencyConditions": [
                                    "Succeeded"
                                ]
                            }
                        ],
                        "policy": {
                            "timeout": "7.00:00:00",
                            "retry": 0,
                            "retryIntervalInSeconds": 30,
                            "secureOutput": false,
                            "secureInput": false
                        },
                        "userProperties": [],
                        "typeProperties": {
                            "source": {
                                "type": "BinarySource",
                                "storeSettings": {
                                    "type": "FileServerReadSettings",
                                    "recursive": true,
                                    "wildcardFileName": {
                                        "value": "@{concat(item(),'.zip')}",
                                        "type": "Expression"
                                    }
                                }
                            },
                            "sink": {
                                "type": "BinarySink",
                                "storeSettings": {
                                    "type": "FileServerWriteSettings",
                                    "copyBehavior": "PreserveHierarchy"
                                }
                            },
                            "enableStaging": false
                        },
                        "inputs": [
                            {
                                "referenceName": "IntegrationRuntimeStorageZip",
                                "type": "DatasetReference"
                            }
                        ],
                        "outputs": [
                            {
                                "referenceName": "FileServer",
                                "type": "DatasetReference"
                            }
                        ]
                    },

@Bilal: Can you paste the JSON for the pipeline ? Also, is this the JSON for the copy data Activity ? If so, looks incomplete with a comma at the end.

Please provide the above, so we can try to help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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