我有一个小的ADF管道,可以将一系列文件从Azure存储帐户复制到Azure Data Lake帐户 . 作为管道中的最后一个活动,我想运行一个U-SQL脚本,该脚本使用复制的文件作为输入,并将结果输出到U-SQL托管表 .
U-SQL脚本基本上从复制的文件中提取数据,应用一些转换,然后将其INSERT到现有的U-SQL托管表中 .
如何(如果可能)可以将U-SQL表添加为Azure数据工厂中的输出数据集?
您当前无法在Azure数据工厂(ADF)中将U-SQL内部表添加为输出数据集 . 最近出现了一个类似的问题here,Michael Rys(U-SQL的"father")的回答是"I know that the ADF team has a work item to do this for you."
您可以使用howerver Azure Data Factory来运行参数化的U-SQL脚本,其中输入参数是文件路径 . 这将有类似的结果 .
来自recent question的示例管道:
{ "name": "ComputeEventsByRegionPipeline", "properties": { "description": "This is a pipeline to compute events for en-gb locale and date less than 2012/02/19.", "activities": [ { "type": "DataLakeAnalyticsU-SQL", "typeProperties": { "scriptPath": "adlascripts\\SearchLogProcessing.txt", "scriptLinkedService": "StorageLinkedService", "degreeOfParallelism": 3, "priority": 100, "parameters": { "in": "/input/SearchLog.tsv", "out": "/output/Result.tsv" } }, ...
基本上,U-SQL脚本来自:
@searchlog = EXTRACT ... FROM @in USING Extractors.Tsv();
至:
@searchlog = EXTRACT ... FROM "/input/SearchLog.tsv" USING Extractors.Tsv();
我认为实现了你想要的相同的东西 .
1 回答
您当前无法在Azure数据工厂(ADF)中将U-SQL内部表添加为输出数据集 . 最近出现了一个类似的问题here,Michael Rys(U-SQL的"father")的回答是"I know that the ADF team has a work item to do this for you."
您可以使用howerver Azure Data Factory来运行参数化的U-SQL脚本,其中输入参数是文件路径 . 这将有类似的结果 .
来自recent question的示例管道:
基本上,U-SQL脚本来自:
至:
我认为实现了你想要的相同的东西 .