我从来没有在RDBMS上创建表的问题。 但是这个钻孔的东西真的很奇怪 - 我无法创建新的空表
我正在关注Apache Drill guide创建表格 我不明白为什么它不像
那样工作第一
0: jdbc:drill:zk=local> USE s3XXXXX.dss;
+-------+---------------------------------------------+
| ok | summary |
+-------+---------------------------------------------+
| true | Default schema changed to [s3XXXXX.dss] |
+-------+---------------------------------------------+
1 row selected (0.172 seconds)
现在为Create commnad:
0: jdbc:drill:zk=local> CREATE TABLE s3XXXXX.dss.`name_key` (NBVXA ) AS QUERY;
Jun 11, 2017 10:53:28 PM org.apache.calcite.runtime.CalciteException <init>
SEVERE: org.apache.calcite.runtime.CalciteException: Non-query expression encountered in illegal context
Jun 11, 2017 10:53:28 PM org.apache.calcite.runtime.CalciteException <init>
SEVERE: org.apache.calcite.runtime.CalciteContextException: From line 1, column 53 to line 1, column 57: Non-query expression encountered in illegal context
Error: PARSE ERROR: Non-query expression encountered in illegal context
SQL Query CREATE TABLE s3XXXXX.dss.`name_key` (NBVXA ) AS QUERY
答案 0 :(得分:0)
CREATE TABLE s3xxxxxx.dss.`name_key3` as SELECT DATE_PART('day', '2015-04-02') xx FROM (VALUES(1)) ;