我得到一个错误信息error while compiling statement: failed: parseexception line 4:1 cannot recognize input near 'into' 'join1_uday' 'from' in expression specification

cgyqldqp  于 2021-04-02  发布在  Hive
关注(0)|答案(1)|浏览(1757)
SELECT 
    stock_prices_uday.trading_date, stock_companies_uday.symbol,
    stock_companies_uday.company_name, stock_companies_uday.headquarter,
    stock_companies_uday.sector, stock_companies_uday.sub_industry,
    stock_prices_uday.open, stock_prices_uday.close, 
    stock_prices_uday.low, stock_prices_uday.high 
INTO 
    JOIN1_UDAY
FROM 
    STOCK_PRICES_UDAY 
INNER JOIN 
    STOCK_COMPANIES_UDAY ON stock_companies_uday.symbol = stock_prices_uday.symbol;

我得到一个错误
error while compiling statement: failed: parseexception line 4:1 cannot recognize input near 'into' 'join1_uday' 'from' in expression specification

1sbrub3j

1sbrub3j1#

hive不支持 "INTO",使用 "CREATE TABLE AS"。

CREATE TABLE JOIN1_UDAY as
    SELECT stock_prices_uday.trading_date, stock_companies_uday.symbol ,stock_companies_uday.company_name,
        stock_companies_uday.headquarter,stock_companies_uday.sector,stock_companies_uday.sub_industry,stock_prices_uday.open,
        stock_prices_uday.close,stock_prices_uday.low,stock_prices_uday.high 
        INTO JOIN1_UDAY
        FROM STOCK_PRICES_UDAY INNER JOIN 
             STOCK_COMPANIES_UDAY 
             ON stock_companies_uday.symbol = stock_prices_uday.symbol;

相关问题