Azure Data Factory V2-输入和输出

问题描述 投票:2回答:1

我正在尝试根据以下github存储库重现以下架构:https://github.com/Azure/cortana-intelligence-price-optimization

问题是与ADF链接的部分,因为在指南中它使用了旧版本的ADF:我不知道如何在ADF v2中映射单个活动的“输入”和“输出”属性,以便他们指向一个数据集。

[管道执行的火花活动只不过是执行python脚本,然后我认为它应该将数据写入已经定义的数据集中。

这里是指南内的ADF V1管道的json,我无法复制:

    "activities": [
    {
      "type": "HDInsightSpark",
      "typeProperties": {
        "rootPath": "adflibs",
        "entryFilePath": "Sales_Data_Aggregation_2.0_blob.py",
        "arguments": [ "modelsample" ],
        "getDebugInfo": "Always"
      },
      "outputs": [
        {
          "name": "BlobStoreAggOutput"
        }
      ],
      "policy": {
        "timeout": "00:30:00",
        "concurrency": 1,
        "retry": 1
      },
      "scheduler": {
        "frequency": "Hour",
        "interval": 1
      },
      "name": "AggDataSparkJob",
      "description": "Submits a Spark Job",
      "linkedServiceName": "HDInsightLinkedService"
    },
azure pipeline azure-data-factory hdinsight azure-data-factory-2
1个回答
0
投票

Data Factory管道中的Spark活动在您自己的或按需的HDInsight群集上执行Spark程序。此article建立在数据转换活动文章的基础上,该文章概述了数据转换和受支持的转换活动。当您使用按需Spark链接服务时,Data Factory会自动为您及时创建一个Spark集群以处理数据,然后在处理完成后删除该集群。

将“ Sales_Data_Aggregation_2.0_blob.py”上传到HDInsight群集所连接的存储帐户,并修改spark活动的示例定义,并创建计划触发器并运行代码:

这里是Spark活动的示例JSON定义:

 {
    "name": "Spark Activity",
    "description": "Description",
    "type": "HDInsightSpark",
    "linkedServiceName": {
        "referenceName": "MyHDInsightLinkedService",
        "type": "LinkedServiceReference"
    },
    "typeProperties": {
        "sparkJobLinkedService": {
            "referenceName": "MyAzureStorageLinkedService",
            "type": "LinkedServiceReference"
        },
        "rootPath": "adfspark",
        "entryFilePath": "test.py",
        "sparkConfig": {
            "ConfigItem1": "Value"
        },
        "getDebugInfo": "Failure",
        "arguments": [
            "SampleHadoopJobArgument1"
        ]
    }
}

希望这会有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.