我有TSV文件,如下所示。
Domain_ID Domain_URL Company_Name_1 Company_Type
179238792 sample.com sample IT
我有一个如下所示的USQL表。
Domain_ID Domain_URL Company_Name_1
179238792 sample.com sample
我正在尝试加入行集并尝试为每家公司获取Company_Type。
脚本:
@result = EXTRACT
Domain_ID int,
Domain_URL string,
Company_Name_1 string,
Company_Type string
FROM @"sample.txt"
USING Extractors.Tsv(skipFirstNRows:1);
@result1=SELECT * FROM table
@result2= @result2= SELECT @result1.Company_Name_1 , @result1.Company_Type FROM @result1
INNER JOIN @result ON @result.Domain_ID==@result1.Domain_ID
OUTPUT @result2
TO "/Mobius_POC/Output/Company_Type.tsv"
USING Outputters.Tsv();
执行上述脚本时,我收到以下错误。
错误:
Description
Invalid syntax found in the script.
Resolution
Correct the script syntax, using expected token(s) as a guide.
Details
at token '@result2', line 9
near the ###:
**************
_Name_1 string,
Company_Type string
FROM @"sample.txt"
USING Extractors.Tsv(skipFirstNRows:1);
@result1=SELECT * FROM MobiusPoc.dbo.TLD_AE
### @result2= SELECT @result1.Company_Name_1 , @result1.Company_Type FROM @result1
INNER JOIN @result ON @result.Domain_ID==@result1.Domain_ID
OUTPUT @resul
Error
E_CSC_USER_SYNTAXERROR
Message
syntax error. Expected one of: '.' ALL ANTISEMIJOIN ANY AS BROADCASTLEFT BROADCASTRIGHT CROSS DISTINCT EXCEPT FROM FULL FULLCROSS GROUP HASH HAVING INDEXLOOKUP INNER INTERSECT JOIN LEFT LOOP MERGE ON OPTION ORDER OUTER OUTER UNION PAIR PARTITION PRESORT PRODUCE READONLY REQUIRED RIGHT SAMPLE SELECT SEMIJOIN SERIAL TO UNIFORM UNION UNIVERSE USING VALUES WHERE WITH ';' '(' ')' ','
答案 0 :(得分:2)
缺少分号(;)###在错误消息中(@ result2之前)
@result=SELECT * FROM table;
@result2= SELECT @result1.Company_Name_1 , @result1...