使用apache钻取多表连接

时间:2018-03-22 09:55:52

标签: mysql hdfs apache-drill

我正在尝试从mysql加入一个表,从hdfs加入2个csv文件,所以我尝试使用apache drill加入3个表。

当我加入mysql表和1个dfs文件时它工作,但是当我尝试加入1个mysql表和2个dfs csv文件时失败。请帮忙。

以下是代码:

select CAST(a.Longitude AS DOUBLE),CAST(a.Latitude AS DOUBLE) 
from ((MySQL.dummy.`accident_05_07` as a 
inner join dfs.`/user/drill/accidents_2009_to_2011.csv` as b 
on a.Longitude=CAST(b.Longitude AS DOUBLE)) 
inner join dfs.`/user/drill/accidents_2012_to_2014.csv` as c 
on a.Longitude=CAST(c.Longitude AS DOUBLE))
  

[错误ID:90c4ac92-83e9-4b23-bcd9-5c1535cd58ad on   inpunpclx1825e.kih.kmart.com:31010]   org.apache.drill.common.exceptions.UserRemoteException:PARSE ERROR:   在非法上下文SQL Query select中遇到非查询表达式   CAST(a.Longitude AS DOUBLE),CAST(a.Latitude AS DOUBLE)   from((MySQL.dummy。accident_05_07作为内连接   dfs。/user/drill/accidents_2009_to_2011.csv作为b   a.Longitude = CAST(b.Longitude AS DOUBLE))内连接   dfs。/user/drill/accidents_2012_to_2014.csv作为c   a.Longitude = CAST(c.Longitude AS DOUBLE))^

0 个答案:

没有答案