Azure数据工厂V2-输入和输出

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

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

管道执行的spark活动只不过是执行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"
    },
guiwullf2 回答:Azure数据工厂V2-输入和输出

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

希望这会有所帮助。

本文链接:https://www.f2er.com/3127316.html

大家都在问