我收到了错误
执行以下插入查询时org.apache.spark.sql.catalyst.parser.ParseException:在输入'with'处没有可行的替代方法来插入表格。
:
INSERT INTO users partition(date)
WITH existentes AS (SELECT COUNT(1) AS name FROM users WHERE date=20160303)
我将不胜感激。
答案 0 :(得分:0)
尝试更改顺序:
WITH existentes AS (SELECT COUNT(1) AS name FROM users WHERE date=20160303)
INSERT INTO users partition(date)