Multiple-level of delimiters works as the following by default:

The first level (fields delimiters) will be \001 (^A, ascii code 1).
Each level of struct and array take an additional field delimitor
following (\002, etc). Each level of map takes 2 levels of additional
field deimitor.

So it will be:
s1.name ^B s1.age  ^A  a1[0].x ^C a2[0].y ^B a1[1].x ^C a2[1].y  ^A
b1.key1 ^C b1.value1[0] ^D b1.value1[1] ^B b1.key2 ^C b1.value2[0] ^D
b1.value2[1]


Zheng

On Fri, Mar 19, 2010 at 6:07 PM, Dilip Joseph
<dilip.antony.jos...@gmail.com> wrote:
> Hello,
>
> What are the delimiters for data to be loaded into a table with nested
> arrays, structs, maps etc?  For example:
>
> CREATE TABLE nested (   s1 STRUCT<name:STRING, age: INT>,
>                                        a1 ARRAY<STRUCT<x:INT, y:INT>>,
>                                        b1 MAP<STRING, ARRAY<INT>>
>                                 )
>
> Should I write a custom SerDe for this?
>
> Thank you,
>
> Dilip
>



-- 
Yours,
Zheng

Reply via email to