来自平面文件的内部联接行集和 SQL
Inner Join rowset from flat file and SQL
我有如下所示的 TSV 文件。
Domain_ID Domain_URL Company_Name_1 Company_Type
179238792 sample.com sample IT
我有一个如下所示的 USQL table。
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 ';' '(' ')' ','
错误消息中 ### 处(@result2 之前)缺少分号 (;)
@result=SELECT * FROM table;
@result2= SELECT @result1.Company_Name_1 , @result1...
我有如下所示的 TSV 文件。
Domain_ID Domain_URL Company_Name_1 Company_Type
179238792 sample.com sample IT
我有一个如下所示的 USQL table。
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 ';' '(' ')' ','
错误消息中 ### 处(@result2 之前)缺少分号 (;)
@result=SELECT * FROM table;
@result2= SELECT @result1.Company_Name_1 , @result1...