Hi
I have a qustion that execting sql in hive failed.
There is my step:

[root@ljxz_hd_S1_125.88.254.153_61618_A ~]# erl
Erlang R16B01 (erts-5.10.2) [source] [64-bit] [smp:24:24]
[async-threads:10] [hipe] [kernel-poll:false]
Eshell V5.10.2  (abort with ^G)
1> odbc:start().
ok
2> {ok,Ref} = odbc:connect("DSN=Sample Cloudera Hive DSN 64",[]).
{ok,<0.41.0>}
3> odbc:sql_query(Ref,"show tables").
{selected,["tab_name"],
          [{"table_name"}]}
4> odbc:sql_query(Ref,"alter table table_name concatenate").
{error,"[Cloudera][HiveODBC] (35) Error from Hive: error code: '2' error
message: 'Error while processing statement: FAILED: Execution Error, return
code 2 from org.apache.hadoop.hive.ql.exec.DDLTask'. SQLSTATE IS: HY000"}

5> odbc:sql_query(Ref,"insert into table_name2 select * from
table_name1").
{error,"[Cloudera][HiveODBC] (35) Error from Hive: error code: '2' error
message: 'Error while processing statement: FAILED: Execution Error, return
code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask'. SQLSTATE IS:
HY000"}

Is there any thing I forget to set?

Reply via email to