【问题标题】:Azure DataFactory copy job copies extension in the name of the destination fileAzure 数据工厂复制作业以目标文件的名称复制扩展名
【发布时间】:2019-11-25 08:31:47
【问题描述】:

在 Azure Datafactory 中,我从一台服务器复制压缩文件并将它们解压缩到另一台服务器中。 源文件具有以下名称和扩展名“sourcefile.zip”,名称中没有“.zip”,实际上是扩展名(使用文件资源管理器中的选项隐藏扩展名进行检查)。复制作业完成后文件夹解压缩,但名称中保留“.zip”,但不是压缩文件夹。

在我的作业文件中,我从源服务器的数据集执行复制作业,并获取由 foreach 循环给出的“@item”并连接通配符文件名中的“.zip”以捕获实际的 zip 文件。因为 foreach 没有给我文件的全名,如果我没有在通配符中提到“.zip”,我会收到错误 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"
                            }
                        ]
                    },

【问题讨论】:

    标签: azure azure-data-factory azure-data-factory-2


    【解决方案1】:

    @Bilal:你能粘贴管道的 JSON 吗?另外,这是复制数据 Activity 的 JSON 吗?如果是这样,看起来不完整,最后有一个逗号。

    请提供以上信息,以便我们尽力为您提供帮助。

    【讨论】:

      猜你喜欢
      • 2021-05-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-02
      • 2022-06-30
      • 1970-01-01
      • 1970-01-01
      • 2019-11-19
      相关资源
      最近更新 更多