将路径脚本写入 Azure 数据工厂 DataLakeAnalytics u-sql 管道

Script paths into Azure Data Factory DataLakeAnalytics u-sql pipeline

我正在尝试按照 azure 分步文档(https://docs.microsoft.com/en-us/azure/data-factory/data-factory-usql-activity).

 {
    "type": "DataLakeAnalyticsU-SQL",
    "typeProperties": {
      "scriptPath": "\scripts\111_risk_index.usql",
      "scriptLinkedService": "PremiumAzureDataLakeStoreLinkedService",
      "degreeOfParallelism": 3,
      "priority": 100,
      "parameters": {
        "in": "/DF_INPUT/Consodata_Prelios_consegna_230617.txt",
        "out": "/DF_OUTPUT/111_Analytics.txt"
      }
    },
    "inputs": [
      {
        "name": "PremiumDataLakeStoreLocation"
      }
    ],
    "outputs": [
      {
        "name": "PremiumDataLakeStoreLocation"
      }
    ],

    "policy": {
      "timeout": "06:00:00",
      "concurrency": 1,
      "executionPriorityOrder": "NewestFirst",
      "retry": 1
    },
    "scheduler": {
      "frequency": "Minute",
      "interval": 15
    },
    "name": "ConsodataFilesProcessing",
    "linkedServiceName": "PremiumAzureDataLakeAnalyticsLinkedService"
  }

发布过程中遇到此错误:

25/07/2017 18:51:59- Publishing Project 'Premium.DataFactory'....
25/07/2017 18:51:59- Validating 6 json files
25/07/2017 18:52:15- Publishing Project 'Premium.DataFactory' to Data 
Factory 'premium-df'
25/07/2017 18:52:15- Value cannot be null.
Parameter name: value

试图弄清楚项目可能出了什么问题,发现问题存在于 activity 选项 "typeProperties" 中,如上所示,特别是 scriptPathscriptLinkedService 属性。文档说:

scriptPath: Path to folder that contains the U-SQL script. Name of the file 
is case-sensitive.  
scriptLinkedService: Linked service that links the storage that contains the 
script to the data factory

在没有它们的情况下发布项目(使用硬编码 script)它将成功完成。问题是我无法弄清楚到底放了什么。我尝试了几种组合路径。我唯一知道的是脚本文件必须作为依赖项在本地引用到解决方案中。

脚本链接服务需要是 Blob 存储,而不是数据湖存储。

忽略发布错误,它具有误导性。

在您的解决方案中将服务链接到 Azure 存储帐户,在 'scriptLinkedService' 属性中引用。然后在 'scriptPath' 属性中引用 blob 容器 + 路径。

例如:

"typeProperties": {
  "scriptPath": "datafactorysupportingfiles/CreateDimensions - Daily.usql",
  "scriptLinkedService": "BlobStore",
  "degreeOfParallelism": 2,
  "priority": 7
},

希望对您有所帮助。

Ps。仔细检查属性名称是否区分大小写。它还可能引发无用的错误。