hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-7216) Hive Query Failure on Hive 0.10.0
Date Fri, 13 Jun 2014 16:13:02 GMT

    [ https://issues.apache.org/jira/browse/HIVE-7216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14030793#comment-14030793
] 

Ashutosh Chauhan commented on HIVE-7216:
----------------------------------------

{{org.apache.hive.hcatalog.data.JsonSerDe}} is a json serde shipped with Hive and is supported
by project. Please switch using to that.

> Hive Query Failure on Hive 0.10.0
> ---------------------------------
>
>                 Key: HIVE-7216
>                 URL: https://issues.apache.org/jira/browse/HIVE-7216
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>         Environment: hadoop 0.20.0, hive 0.10.0, Ubuntu 13.04 LTS
>            Reporter: Suddhasatwa Bhaumik
>         Attachments: HadoopTaskDetails.html
>
>
> Hello,
> I have created a table and a view in hive as below:
> ADD JAR json-serde-1.1.6-SNAPSHOT-jar-with-dependencies.jar;
> CREATE EXTERNAL TABLE IF NOT EXISTS ulf_raw (
>    transactionid STRING,
>    externaltraceid STRING,
>    externalreferenceid STRING,
>    usecaseid STRING,
>    timestampin STRING,
>    timestampout STRING,
>    component STRING,
>    destination STRING,
>    callerid STRING,
>    service STRING,
>    logpoint STRING,
>    requestin STRING,
>    status STRING,
>    errorcode STRING,
>    error STRING,
>    servername STRING,
>    inboundrequestip STRING,
>    inboundrequestport STRING,
>    outboundurl STRING,
>    messagesize STRING,
>    jmsdestination STRING,
>    msisdn STRING,
>    countrycode STRING,
>    acr STRING,
>    imei STRING,
>    imsi STRING,
>    iccid STRING,
>    email STRING,
>    payload STRING
> )
> ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
> WITH SERDEPROPERTIES ( "mapping.transactionid" = "transaction-id","mapping.timestampin"
= "timestamp-in" )
> LOCATION '/home/bhaumik/input';
> ADD JAR json-serde-1.1.6-SNAPSHOT-jar-with-dependencies.jar;
> create view IF NOT EXISTS parse_soap_payload
> as
> select
> transactionid,
> component,
> logpoint,
> g.service as service,
> case g.service
> when 'createHierarchyNode' then
> xpath_string(payload,'/*[local-name()=\'Envelope\']/*[local-name()=\'Body\']/*[local-name()=\'createHierarchyNode\']/*[local-name()=\'opcoNodeId\']/text()')
> when 'retrieveHierarchyNode' then
> xpath_string(payload,'/*[local-name()=\'Envelope\']/*[local-name()=\'Body\']/*[local-name()=\'retrieveHierarchyNode\']/*[local-name()=\'opcoNodeId\']/text()')
> when 'updateHierarchyNode' then
> xpath_string(payload,'/*[local-name()=\'Envelope\']/*[local-name()=\'Body\']/*[local-name()=\'updateHierarchyNode\']/*[local-name()=\'opcoNodeId\']/text()')
> end as opcoNodeId
> ,
> case g.service
> when 'createHierarchyNode' then
> xpath_string(payload,'/*[local-name()=\'Envelope\']/*[local-name()=\'Body\']/*[local-name()=\'createHierarchyNode\']/*[local-name()=\'opcoId\']/text()')
> when 'retrieveHierarchyNode' then
> xpath_string(payload,'/*[local-name()=\'Envelope\']/*[local-name()=\'Body\']/*[local-name()=\'retrieveHierarchyNode\']/*[local-name()=\'opcoId\']/text()')
> when 'updateHierarchyNode' then
> xpath_string(payload,'/*[local-name()=\'Envelope\']/*[local-name()=\'Body\']/*[local-name()=\'updateHierarchyNode\']/*[local-name()=\'opcoId\']/text()')
> end as opcoId
> ,
> case g.service
> when 'createHierarchyNode' then
> xpath_string(payload,'/*[local-name()=\'Envelope\']/*[local-name()=\'Body\']/*[local-name()=\'createHierarchyNode\']/*[local-name()=\'partnerParentNodeId\']/text()')
> when 'retrieveHierarchyNode' then
> xpath_string(payload,'/*[local-name()=\'Envelope\']/*[local-name()=\'Body\']/*[local-name()=\'retrieveHierarchyNode\']/*[local-name()=\'partnerParentNodeId\']/text()')
> when 'updateHierarchyNode' then
> xpath_string(payload,'/*[local-name()=\'Envelope\']/*[local-name()=\'Body\']/*[local-name()=\'updateHierarchyNode\']/*[local-name()=\'partnerParentNodeId\']/text()')
> end as partnerParentNodeId
> ,
> case g.service
> when 'createHierarchyNode' then
> xpath_string(payload,'/*[local-name()=\'Envelope\']/*[local-name()=\'Body\']/*[local-name()=\'createHierarchyNode\']/*[local-name()=\'partnerId\']/text()')
> when 'retrieveHierarchyNode' then
> xpath_string(payload,'/*[local-name()=\'Envelope\']/*[local-name()=\'Body\']/*[local-name()=\'retrieveHierarchyNode\']/*[local-name()=\'partnerId\']/text()')
> when 'updateHierarchyNode' then
> xpath_string(payload,'/*[local-name()=\'Envelope\']/*[local-name()=\'Body\']/*[local-name()=\'updateHierarchyNode\']/*[local-name()=\'partnerId\']/text()')
> end as partnerId
> from ulf_raw g;
> When I am running hive query: select * from parse_soap_payload;
> it is failing with attached error. 
> I only have json-serde-1.1.6-SNAPSHOT-jar-with-dependencies.jar file in Hadoop LIB and
HIVE LIB folder. Please advise if there are other JAR files required to be added here. If
yes, please advise from where I can download them?
> Thanks,
> Suddhasatwa



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message