在使用 ADF v2 上传数据之前在 Azure 存储中创建容器

Creating a container in azure storage before uploading the data using ADF v2

提前致谢,我是 ADF 的新手并且已经从 ADF 门户创建了一个管道。源本地服务器文件夹和目标数据集是 Azure Blob 存储。我正在使用 tumbling window 传递日期开始时间和 日期结束时间,仅使用 lastmodified 日期时间上传最新数据。

Query : If i want to create subcontainers on fly in azure storage i use /container/$monthvariable and it automatically creates a subcontainer based on the month variable

这里的例子我的来源是

dfac/
$monthvariable = 5

如果我把

dfac/$monthvariable

然后所有文件将上传到 dfac/5/ 下,如下所示

dfac/5/file1
dfac/5/file2
dfac/5/file3

在 ADF 中,我想获取管道月的月份并将其添加到管道中。那是我能做的吗?我在哪里可以定义变量?

  {
            "name": "Destination",
            "value": "dfac/$monthvariable"// does it work and is this the right way to do this stuff
        }

我的实际代码如下所示。

{
    "name": "Copy_ayy",
    "type": "Copy",
    "policy": {
        "timeout": "7.00:00:00",
        "retry": 2,
        "retryIntervalInSeconds": 30,
        "secureOutput": false,
        "secureInput": false
    },
    "userProperties": [
        {
            "name": "Source",
            "value": "/*"
        },
        {
            "name": "Destination",
            "value": "dfac/"
        }
    ],
    "typeProperties": {
        "source": {
            "type": "FileSystemSource",
            "recursive": true
        },
        "sink": {
            "type": "BlobSink",
            "copyBehavior": "PreserveHierarchy"
        },
        "enableStaging": false
    },
    "inputs": [
        {
            "referenceName": "SourceDataset_ayy",
            "type": "DatasetReference",
            "parameters": {
                "cw_modifiedDatetimeStart": "@pipeline().parameters.windowStart",
                "cw_modifiedDatetimeEnd": "@pipeline().parameters.windowEnd"
            }
        }
    ],
    "outputs": [
        {
            "referenceName": "DestinationDataset_ayy",
            "type": "DatasetReference"
        }
    ]
}

我相信你正在使用复制数据工具。然后你也可以用它来帮助你完成目标路径部分。它将帮助您创建参数。