Member since
05-18-2017
30
Posts
0
Kudos Received
2
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
5001 | 11-04-2018 11:30 PM | |
59955 | 04-05-2018 02:58 AM |
02-24-2019
05:59 AM
In case you are doing it from Windows you can use Python script hivehoney to extract table data to local CSV file. It will: Login to bastion host. pbrun. kinit. beeline (with your query). Save echo from beeline to a file on Windows. Execute it like this: set PROXY_HOST=your_bastion_host
set SERVICE_USER=you_func_user
set LINUX_USER=your_SOID
set LINUX_PWD=your_pwd
python hh.py --query_file=query.sql
... View more
11-04-2018
11:30 PM
This is the solution for the above question hive> select a.mon,a.no,b.no from t13 a join t14 b on (a.mon = b.mon);
Query ID = tester_20181105125833_11998cc2-0343-4f56-9e85-2f4628e72e2b
Total jobs = 1
Launching Job 1 out of 1
Status: Running (Executing on YARN cluster with App id application_1541140095101_0005)
--------------------------------------------------------------------------------
VERTICES STATUS TOTAL COMPLETED RUNNING PENDING FAILED KILLED
--------------------------------------------------------------------------------
Map 1 .......... SUCCEEDED 1 1 0 0 0 0
Map 2 .......... SUCCEEDED 1 1 0 0 0 0
--------------------------------------------------------------------------------
VERTICES: 02/02 [==========================>>] 100% ELAPSED TIME: 0.48 s
--------------------------------------------------------------------------------
OK
JAN 447 547
FEB 504 497
MAR 554 544
APR 517 526
MAY 456 524
JUN 468 527
JUL 528 540
AUG 509 500
SEP 483 490
OCT 565 564
NOV 561 530
DEC 538 452
Time taken: 1.315 seconds, Fetched: 12 row(s)
... View more
10-31-2018
06:06 PM
Hi, The error message "Unsupported major.minor version 52.0" means the UDF jar file was compile on a version of Java that is different to the one used for HS2. If you run below command: javap -verbose com/udf/StringSplitter.class | grep "major" What is the number returned? Below are the major version number for different version of Java: Java 5 uses major version 49 Java 6 uses major version 50 Java 7 uses major version 51 Java 8 uses major version 52 Java 9 uses major version 53 So you need to compile using the Java that has the same version that HS2 runs under. Hope above helps.
... View more
08-14-2017
06:46 PM
Returned 15 row(s) in 0.39s
[localhost.localdomain:21000] > create table emp2 AS
> select name,dept,job from svk.emp;
Query: create table emp2 AS select name,dept,job from svk.emp
ERROR: AnalysisException: Syntax error at:
create table emp2 AS select name,dept,job from svk.emp
^
Encountered: AS
Expected: LIKE
CAUSED BY: Exception: Syntax error
[localhost.localdomain:21000] > create table emp2 LIKE select name,dept,job from svk.emp;
Query: create table emp2 LIKE select name,dept,job from svk.emp
ERROR: AnalysisException: Syntax error at:
create table emp2 LIKE select name,dept,job from svk.emp
^
Encountered: SELECT
Expected: IDENTIFIER
CAUSED BY: Exception: Syntax error
[localhost.localdomain:21000] > create table emp2 LIKE emp;
Query: create table emp2 LIKE emp
[localhost.localdomain:21000] > create table emp2 AS select name,dept,job from svk.emp;
Query: create table emp2 AS select name,dept,job from svk.emp
ERROR: AnalysisException: Syntax error at:
create table emp2 AS select name,dept,job from svk.emp
^
Encountered: AS
Expected: LIKE
CAUSED BY: Exception: Syntax error
[localhost.localdomain:21000] > create table emp3 as select name,dept from emp;
Query: create table emp3 as select name,dept from emp
ERROR: AnalysisException: Syntax error at:
create table emp3 as select name,dept from emp
^
Encountered: AS
Expected: LIKE i have followed as you said, but it is giving below errors
... View more
08-02-2017
04:19 AM
Hi, As the error message indicated, UNION ALL is not supported at top level, you need to put it in a sub query, similar to below: SELECT loc, cnt FROM ( select a.loc as loc, a.cnt13 cnt from crimeloc13 a UNION ALL select b.loc as loc, b.cnt14 as cnt from crimeloc14 b ) a;
... View more