Share via


az datafactory pipeline

注意

此參考是 Azure CLI 的 datafactory 延伸模組的一部分(2.15.0 版或更高版本)。 擴充功能會在您第一次執行 az datafactory pipeline 命令時自動安裝。 深入了解擴充功能。

使用 datafactory 管理管線。

命令

名稱 Description 類型 狀態
az datafactory pipeline create

建立管線。

副檔名 GA
az datafactory pipeline create-run

建立管線的執行。

副檔名 GA
az datafactory pipeline delete

刪除管線。

副檔名 GA
az datafactory pipeline list

列出管線。

副檔名 GA
az datafactory pipeline show

取得管線。

副檔名 GA
az datafactory pipeline update

更新管線。

副檔名 GA

az datafactory pipeline create

建立管線。

az datafactory pipeline create --factory-name
                               --name
                               --pipeline
                               --resource-group
                               [--if-match]

範例

Pipelines_Create

az datafactory pipeline create --factory-name "exampleFactoryName" --pipeline "{\"activities\":[{\"name\":\"ExampleForeachActivity\",\"type\":\"ForEach\",\"typeProperties\":{\"activities\":[{\"name\":\"ExampleCopyActivity\",\"type\":\"Copy\",\"inputs\":[{\"type\":\"DatasetReference\",\"parameters\":{\"MyFileName\":\"examplecontainer.csv\",\"MyFolderPath\":\"examplecontainer\"},\"referenceName\":\"exampleDataset\"}],\"outputs\":[{\"type\":\"DatasetReference\",\"parameters\":{\"MyFileName\":{\"type\":\"Expression\",\"value\":\"@item()\"},\"MyFolderPath\":\"examplecontainer\"},\"referenceName\":\"exampleDataset\"}],\"typeProperties\":{\"dataIntegrationUnits\":32,\"sink\":{\"type\":\"BlobSink\"},\"source\":{\"type\":\"BlobSource\"}}}],\"isSequential\":true,\"items\":{\"type\":\"Expression\",\"value\":\"@pipeline().parameters.OutputBlobNameList\"}}}],\"parameters\":{\"JobId\":{\"type\":\"String\"},\"OutputBlobNameList\":{\"type\":\"Array\"}},\"variables\":{\"TestVariableArray\":{\"type\":\"Array\"}},\"runDimensions\":{\"JobId\":{\"type\":\"Expression\",\"value\":\"@pipeline().parameters.JobId\"}},\"duration\":\"0.00:10:00\"}" --name "examplePipeline" --resource-group "exampleResourceGroup"

必要參數

--factory-name

Factory 名稱。

--name --pipeline-name -n

管線名稱。

--pipeline

管線資源定義。 預期值:json-string/json-file/@json-file。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--if-match

管線實體的 ETag。 應該只針對更新指定,而更新應該符合現有的實體,也可以為 * 進行無條件更新。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az datafactory pipeline create-run

建立管線的執行。

az datafactory pipeline create-run --factory-name
                                   --name
                                   --resource-group
                                   [--is-recovery {false, true}]
                                   [--parameters]
                                   [--reference-pipeline-run-id]
                                   [--start-activity-name]
                                   [--start-from-failure {false, true}]

範例

Pipelines_CreateRun

az datafactory pipeline create-run --factory-name "exampleFactoryName" --parameters "{\"OutputBlobNameList\":[\"exampleoutput.csv\"]}" --name "examplePipeline" --resource-group "exampleResourceGroup"

必要參數

--factory-name

Factory 名稱。

--name --pipeline-name -n

管線名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--is-recovery

復原模式旗標。 如果復原模式設定為 true,則指定的參考管線執行和新的執行將會分組在相同的 groupId 下。

接受的值: false, true
--parameters

管線執行的參數。 只有在未指定 runId 時,才會使用這些參數。 預期值:json-string/json-file/@json-file。

--reference-pipeline-run-id

管線執行標識碼。 如果指定執行標識碼,則會使用指定回合的參數來建立新的執行。

--start-activity-name

在復原模式中,重新執行會從此活動開始。 如果未指定,則會執行所有活動。

--start-from-failure

在復原模式中,如果設定為 true,重新執行將會從失敗的活動開始。 只有在未指定 startActivityName 時,才會使用 屬性。

接受的值: false, true
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az datafactory pipeline delete

刪除管線。

az datafactory pipeline delete [--factory-name]
                               [--ids]
                               [--name]
                               [--resource-group]
                               [--subscription]
                               [--yes]

範例

Pipelines_Delete

az datafactory pipeline delete --factory-name "exampleFactoryName" --name "examplePipeline" --resource-group "exampleResourceGroup"

選擇性參數

--factory-name

Factory 名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name --pipeline-name -n

管線名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--yes -y

不提示確認。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az datafactory pipeline list

列出管線。

az datafactory pipeline list --factory-name
                             --resource-group

範例

Pipelines_ListByFactory

az datafactory pipeline list --factory-name "exampleFactoryName" --resource-group "exampleResourceGroup"

必要參數

--factory-name

Factory 名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az datafactory pipeline show

取得管線。

az datafactory pipeline show [--factory-name]
                             [--ids]
                             [--if-none-match]
                             [--name]
                             [--resource-group]
                             [--subscription]

範例

Pipelines_Get

az datafactory pipeline show --factory-name "exampleFactoryName" --name "examplePipeline" --resource-group "exampleResourceGroup"

選擇性參數

--factory-name

Factory 名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--if-none-match

管線實體的 ETag。 應該只指定 get。 如果 ETag 符合現有的實體標記,或提供 *,則不會傳回任何內容。

--name --pipeline-name -n

管線名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az datafactory pipeline update

更新管線。

az datafactory pipeline update [--activities]
                               [--add]
                               [--annotations]
                               [--concurrency]
                               [--description]
                               [--duration]
                               [--factory-name]
                               [--folder-name]
                               [--force-string]
                               [--ids]
                               [--if-match]
                               [--if-none-match]
                               [--name]
                               [--parameters]
                               [--remove]
                               [--resource-group]
                               [--run-dimensions]
                               [--set]
                               [--subscription]
                               [--variables]

範例

Pipelines_Update

az datafactory pipeline update --factory-name "exampleFactoryName" --description "Example description" --activities "[{\"name\":\"ExampleForeachActivity\",\"type\":\"ForEach\",\"typeProperties\":{\"activities\":[{\"name\":\"ExampleCopyActivity\",\"type\":\"Copy\",\"inputs\":[{\"type\":\"DatasetReference\",\"parameters\":{\"MyFileName\":\"examplecontainer.csv\",\"MyFolderPath\":\"examplecontainer\"},\"referenceName\":\"exampleDataset\"}],\"outputs\":[{\"type\":\"DatasetReference\",\"parameters\":{\"MyFileName\":{\"type\":\"Expression\",\"value\":\"@item()\"},\"MyFolderPath\":\"examplecontainer\"},\"referenceName\":\"exampleDataset\"}],\"typeProperties\":{\"dataIntegrationUnits\":32,\"sink\":{\"type\":\"BlobSink\"},\"source\":{\"type\":\"BlobSource\"}}}],\"isSequential\":true,\"items\":{\"type\":\"Expression\",\"value\":\"@pipeline().parameters.OutputBlobNameList\"}}}]" --parameters "{\"OutputBlobNameList\":{\"type\":\"Array\"}}" --duration "0.00:10:00" --name "examplePipeline" --resource-group "exampleResourceGroup"

選擇性參數

--activities

管線中的活動清單。 預期值:json-string/json-file/@json-file。

--add

藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例:--add property.listProperty <key=value, string or JSON string>

預設值: []
--annotations

可用於描述管線的標記清單。 預期值:json-string/json-file/@json-file。

--concurrency

管線的並行執行數目上限。

--description

管線的描述。

--duration

TimeSpan 值,之後就會引發 Azure 監視計量。 預期值:json-string/json-file/@json-file。

--factory-name

Factory 名稱。

--folder-name

此管線位於的資料夾名稱。

--force-string

使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。

預設值: False
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--if-match

管線實體的 ETag。 應該只針對更新指定,而更新應該符合現有的實體,也可以為 * 進行無條件更新。

--if-none-match

管線實體的 ETag。 應該只指定 get。 如果 ETag 符合現有的實體標記,或提供 *,則不會傳回任何內容。 預設值為 None。

--name --pipeline-name -n

管線名稱。

--parameters

管線的參數清單。 預期值:json-string/json-file/@json-file。

--remove

從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove>--remove propertyToRemove

預設值: []
--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--run-dimensions

管線發出的維度。 預期值:json-string/json-file/@json-file。

--set

指定要設定的屬性路徑和值,以更新物件。 範例:--set property1.property2=<value>

預設值: []
--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--variables

管線的變數清單。 預期值:json-string/json-file/@json-file。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。