在Azure数据工厂中的管道中运行U-SQL活动时出错
我在ADF的管道中运行USQL勾那时碰着以下错误: 勾当错误: {"errorId":"E_CSC_USER_SYNTAXERROR","severity":"Error","component":"CSC","source":"USER","message":"syntax error. Final statement did not end with a semicolon","details":"at token 'txt',line 3rnnear the ###:rn**************rnDECLARE @in string = "/demo/SearchLog.txt";nDECLARE @out string = "/scripts/Result.txt";nSearchLogProcessing.txt ### n","description":"Invalid syntax found in the script.","resolution":"Correct the script syntax,using expected token(s) as a guide.","helpLink":"","filePath":"","lineNumber":3,"startOffset":109,"endOffset":112}]. 这是输出数据集,管道和USQL剧本的代码,我试图在管道中执行. OutputDataset: { "name": "OutputDataLakeTable","properties": { "published": false,"type": "AzureDataLakeStore","linkedServiceName": "LinkedServiceDestination","typeProperties": { "folderPath": "scripts/" },"availability": { "frequency": "Hour","interval": 1 } } 管道: { "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": { "script": "SearchLogProcessing.txt","scriptPath": "scripts","degreeOfParallelism": 3,"priority": 100,"parameters": { "in": "/demo/SearchLog.txt","out": "/scripts/Result.txt" } },"inputs": [ { "name": "InputDataLakeTable" } ],"outputs": [ { "name": "OutputDataLakeTable" } ],"policy": { "timeout": "06:00:00","concurrency": 1,"executionPriorityOrder": "NewestFirst","retry": 1 },"scheduler": { "frequency": "Minute","interval": 15 },"name": "CopybyU-SQL","linkedServiceName": "AzureDataLakeAnalyticsLinkedService" } ],"start": "2017-01-03T12:01:05.53Z","end": "2017-01-03T13:01:05.53Z","isPaused": false,"hubName": "denojaidbfactory_hub","pipelineMode": "Scheduled" } } 这是我的USQL剧本,我试图行使“DataLakeAnalyticsU-SQL”勾当范例执行. @searchlog = EXTRACT UserId int,Start DateTime,Region string,Query string,Duration int?,Urls string,ClickedUrls string FROM @in USING Extractors.Text(delimiter:'|'); @rs1 = SELECT Start,Region,Duration FROM @searchlog WHERE Region == "kota"; OUTPUT @rs1 TO @out USING Outputters.Text(delimiter:'|'); 请提议我怎样办理此题目. 办理要领您的剧本穷乏scriptLinkedService属性.您(当前)还必要将U-SQL剧本安排在Azure Blob存储中以乐成运行它.因此,您还必要AzureStorage链接处事,譬喻:{ "name": "StorageLinkedService","properties": { "description": "","type": "AzureStorage","typeProperties": { "connectionString": "DefaultEndpointsProtocol=https;AccountName=myAzureBlobStorageAccount;AccountKey=**********" } } } 建设此链接处事,将Blob存储名称myAzureBlobStorageAccount替代为相干的Blob存储帐户,然后将U-SQL剧本(SearchLogProcessing.txt)放在容器中,然后重试.在下面的示例管道中,我在Blob存储区中有一个名为adlascripts的容器,剧本在哪里: 正如Alexandre所说,确保scriptPath完备.管道的开始: { "name": "ComputeEventsByRegionPipeline","typeProperties": { "scriptPath": "adlascriptsSearchLogProcessing.txt","scriptLinkedService": "StorageLinkedService","parameters": { "in": "/input/SearchLog.tsv","out": "/output/Result.tsv" } },... 输入和输出.tsv文件可以位于数据湖中,并行使AzureDataLakeStoreLinkedService链接处事. 我可以看到你正在实行遵循以下演示:https://docs.microsoft.com/en-us/azure/data-factory/data-factory-usql-activity#script-definition.这不是最直观的演示,好像存在一些题目,譬喻StorageLinkedService的界说在那边?,SearchLogProcessing.txt在那边?好吧,我通过谷歌搜刮找到它,但网页上应该有一个链接.我获得了它的事变,但感受有点像混血王子中的哈利波特. (编辑:湖南网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |