你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az datafactory pipeline

Note

此参考是 Azure CLI(版本 2.15.0 或更高版本) 的数据工厂 扩展的一部分。 该扩展会在首次运行 az datafactory pipeline 命令时自动安装。 了解更多关于扩展的信息。

使用 datafactory 管理管道。

命令

名称 说明 类型 Status
az datafactory pipeline create

创建管道。

Extension GA
az datafactory pipeline create-run

创建管道的运行。

Extension GA
az datafactory pipeline delete

删除管道。

Extension GA
az datafactory pipeline list

列出管道。

Extension GA
az datafactory pipeline show

获取管道。

Extension GA
az datafactory pipeline update

更新管道。

Extension GA

az datafactory pipeline create

创建管道。

az datafactory pipeline create --factory-name
                               --name --pipeline-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

工厂名称。

--name --pipeline-name -n

管道名称。

--pipeline

管道资源定义。 预期值:json-string/json-file/@json-file。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--if-match

管道实体的 ETag。 应仅指定用于更新,应将其与现有实体匹配,也可以为 * 进行无条件更新。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az datafactory pipeline create-run

创建管道的运行。

az datafactory pipeline create-run --factory-name
                                   --name --pipeline-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

工厂名称。

--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

管道运行标识符。 如果指定运行 ID,则指定运行的参数将用于创建新运行。

--start-activity-name

在恢复模式下,重新运行将从此活动开始。 如果未指定,则所有活动都将运行。

--start-from-failure

在恢复模式下,如果设置为 true,则重新运行将从失败的活动开始。 仅当未指定 startActivityName 时,才会使用该属性。

属性
接受的值: false, true
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az datafactory pipeline delete

删除管道。

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

示例

Pipelines_Delete

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

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--factory-name

工厂名称。

属性
参数组: Resource Id Arguments
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
参数组: Resource Id Arguments
--name --pipeline-name -n

管道名称。

属性
参数组: Resource Id Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
参数组: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
参数组: Resource Id Arguments
--yes -y

不要提示确认。

属性
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

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

工厂名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az datafactory pipeline show

获取管道。

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

示例

Pipelines_Get

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

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--factory-name

工厂名称。

属性
参数组: Resource Id Arguments
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
参数组: Resource Id Arguments
--if-none-match

管道实体的 ETag。 应仅指定 get。 如果 ETag 与现有实体标记匹配,或者如果提供 *,则不会返回任何内容。

--name --pipeline-name -n

管道名称。

属性
参数组: Resource Id Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
参数组: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
参数组: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

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 --pipeline-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>

属性
参数组: Generic Update Arguments
默认值: []
--annotations

可用于描述管道的标记列表。 预期值:json-string/json-file/@json-file。

--concurrency

管道的最大并发运行数。

--description

管道的说明。

--duration

TimeSpan 值,之后将触发 Azure 监视指标。 预期值:json-string/json-file/@json-file。

属性
参数组: Policy Elapsed Time Metric Arguments
--factory-name

工厂名称。

属性
参数组: Resource Id Arguments
--folder-name

此管道所在的文件夹的名称。

属性
参数组: Folder Arguments
--force-string

使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。

属性
参数组: Generic Update Arguments
默认值: False
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
参数组: Resource Id Arguments
--if-match

管道实体的 ETag。 应仅指定用于更新,应将其与现有实体匹配,也可以为 * 进行无条件更新。

--if-none-match

管道实体的 ETag。 应仅指定 get。 如果 ETag 与现有实体标记匹配,或者如果提供 *,则不会返回任何内容。 默认值为无。

--name --pipeline-name -n

管道名称。

属性
参数组: Resource Id Arguments
--parameters

管道的参数列表。 预期值:json-string/json-file/@json-file。

--remove

从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.

属性
参数组: Generic Update Arguments
默认值: []
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
参数组: Resource Id Arguments
--run-dimensions

管道发出的维度。 预期值:json-string/json-file/@json-file。

--set

通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>

属性
参数组: Generic Update Arguments
默认值: []
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
参数组: Resource Id Arguments
--variables

管道的变量列表。 预期值:json-string/json-file/@json-file。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False