ADF runs ADL jobs with syntax error

I am trying to run a task that is successfully executing from Visual Studio. I would like to run this in my ADF pipeline, but the operation failed with a syntax error.

ERRORID:  E_CSC_USER_SYNTAXERROR
SEVERITY:  Error
COMPONENT:  CSC
SOURCE:  USER
MESSAGE:  
syntax error. Expected one of: '[' end-of-file ALTER COMBINE CREATE DEPLOY DROP EXTRACT IF INSERT OUTPUT PROCESS REDUCE REFERENCE RESOURCE SELECT TABLE TRUNCATE UPDATE USE USING VIEW identifier quoted-identifier variable ';' '(' 

DETAILS:  
at token [], line 2
near the ###:
**************
DECLARE @outSlice string = "somepath.csv"; 
### USE DATABASE myDB;

//LOCAL    
//DECLARE @root string = @"some local path";

//CLOUD    
//DECLARE @root string = "adl://storeuri";    
DECLARE @root string = "wasb://container@account/";

//RUN MODE 0
//DECLARE @var2 int = 1;    
//DECLARE @var1 int = 1;
DECLARE @path1 string = @root + @"path1/xyz.csv"; 

EDIT: I tried this as with the USE DATABASE statement, and I commented on this as shown above: ### appears in the same place in both cases. EDIT2: added sequential lines of code for the request from @ michael-rys Later in the script, the @outSlice parameter is used in the output expression of type

OUTPUT @dataset
TO @outSlice
USING Outputters.Csv();

The parameter is defined as part of the pipeline operation. The snapshot below:

       "type": "DataLakeAnalyticsU-SQL",
        "typeProperties": {
            "scriptPath": "script.usql",
            "scriptLinkedService": "storageXYX",
            "degreeOfParallelism": 2,
            "priority": 0,
            "parameters": {
                "outSlice": "$$Text.Format('/Output/{0:yyyy}/{0:MM}/{0:dd}/{0:HH}/somefile.csv',SliceStart)"
            }
+4
source share
1 answer

script, ADF . Visual Studio, File- > Advanced Save Options. UTF-8 . @michael-rys!

+2

Source: https://habr.com/ru/post/1624895/


All Articles