Hello everyone:

 

I’m confused on how to alias a column. Using Hive .9.

 

I’m running the below sql to try to query an index table and I’m getting the
following error.

 

SELECT
     customer_number
   , _bucketname
   , _offsets
FROM
default.default__customer_table_idx_customer_table__
;

 

ERROR [HY000] [MapR][Hardy] (22) Error from ThriftHiveClient: Query returned
non-zero code: 40000, cause: FAILED: ParseException line 4:3 mismatched
input ',' expecting \' near '_bucketname' in character string literal

SELECT Command Failed.

 

A SELECT * on the table will bring back column _bucketname and _offsets.
This is what I want because those are the columns names.

 

How can I alias these columns _bucketname and _offesets to bring back their
names without running in to this error?  I’m assuming you need to use \ to
escape the underscore, but so far I’ve not figured out how to do it. :/

 

 

Best Regards,

 

Todd Wilson

Senior Technical Consultant

Coffing Data Warehousing

(513) 292-3158

 <http://www.coffingdw.com/> www.CoffingDW.com

 

 

********************************

The information contained in this communication is confidential, private,
proprietary, or otherwise privileged and is intended only for the use of the
addressee. Unauthorized use, disclosure, distribution or copying is strictly
prohibited and may be unlawful. If you have received this communication in
error, please notify the sender immediately at
<mailto:gene...@coffingdw.com> gene...@coffingdw.com.

*********************************

 

From: Tim Bittersohl [mailto:t...@innoplexia.com] 
Sent: Wednesday, February 27, 2013 11:36 AM
To: user@hive.apache.org
Subject: Get the job id for a hive query

 

Hi,

 

has the Hive client the possibility to give back the job id of the job
created when running a query? I need that for tracking.

 

 

Greetings

Tim Bittersohl 

Software Engineer 


http://www.innoplexia.de/ci/logo/inno_logo_links%20200x80.png

Innoplexia GmbH
Mannheimer Str. 175 

69123 Heidelberg 

Tel.: +49 (0) 6221 7198033 
Fax: +49 (0) 6221 7198034 
Web: www.innoplexia.com <http://www.innoplexia.com/>  

Sitz: 69123 Heidelberg, Mannheimer Str. 175 - Steuernummer 32494/62606 -
USt. IdNr.: DE 272 871 728 - Geschäftsführer: Christian Schneider, Walery
Strauch, Prof. Dr. Herbert Schuster 

 

<<image001.png>>

Reply via email to