hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rohan monga <monga.ro...@gmail.com>
Subject casting complex data types for outputs of custom scripts
Date Mon, 13 Jan 2014 23:22:30 GMT
Hi,

I have a table that is of the following format

create table t1 ( f1 int, f2 array<struct<a1:int, a2:int>> );

Now I have a custom script that does some computation and generates
the value for f2
like so

from (
    from randomtable r
    map r.g1, r.g2, r.g3
    using '/bin/cat' as g1, g2, g3
    cluster by g1 ) m
    insert overwrite table t1
    reduce m.g1, m.g2, m.g3
    using 'python customScript.py' as ( f1 , f2 );

however f2 is not being loaded properly into t1, it comes up broken or
null. What should I do so that f2 is loaded as an array of structs.


Thanks,

--
Rohan Monga

Mime
View raw message