簡體   English   中英

使用ADF v2上載數據之前,請在azure存儲中創建一個容器

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

預先感謝,我是ADF的新手,並且已經從ADF門戶創建了管道。 源本地服務器文件夾和目標數據集是Azure Blob存儲。 我正在使用滾動窗口,該窗口傳遞日期開始時間和日期結束時間,並且僅使用lastmodified datetime上傳最新數據。

查詢:如果我想在azure存儲中動態創建子容器,請使用/ container / $ monthvariable,它會根據month變量自動創建一個子容器

這里的例子我的來源是

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"
        }
    ]
}

我相信您正在使用復制數據工具。 然后,您也可以將其用於目標路徑部分。 這將幫助您創建參數。 在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM