Re: Question regarding nested complex data type

2013-06-21 Thread Dean Wampler
;) I actually thought it was a clever choice on Hive's part. There's no real need for the 2nd tier separators, despite the nested collections! However, it's still tricky to know what Hive expects when you're generating table data with other apps. dean On Thu, Jun 20, 2013 at 9:34 PM, Stephen Spr

Re: Question regarding nested complex data type

2013-06-20 Thread Stephen Sprague
look at it the other around if you want. knowing an array of a two element struct is topologically the same as a map - they darn well better be the same. :) On Thu, Jun 20, 2013 at 7:00 PM, Dean Wampler wrote: > It's not as "simple" as it seems, as I discovered yesterday, to my > surprise. I

Re: Question regarding nested complex data type

2013-06-20 Thread Dean Wampler
It's not as "simple" as it seems, as I discovered yesterday, to my surprise. I created a table like this: CREATE TABLE t ( name STRING, stuff ARRAY>); I then used an insert statement to see how Hive would store the records, so I could populate the real table with another process. Hive used

Re: Question regarding nested complex data type

2013-06-20 Thread Stephen Sprague
you only get three. field separator, array elements separator (aka collection delimiter), and map key/value separator (aka map key delimiter). when you nest deeper then you gotta use the default '^D', '^E' etc for each level. At least that's been my experience which i've found has worked succes

Re: Question regarding nested complex data type

2013-06-20 Thread neha
Thanks a lot for your reply, Stephen. To answer your question - I was not aware of the fact that we could use delimiter (in my example, '|') for first level of nesting. I tried now and it worked fine. My next question - Is there any way to provide delimiter in DDL for second level of nesting? Than

Re: Question regarding nested complex data type

2013-06-20 Thread Stephen Sprague
its all there in the documentation under "create table" and it seems you got everything right too except one little thing - in your second example there for 'sample data loaded' - instead of '^B' change that to '|' and you should be good. That's the delimiter that separates your two array elements

Question regarding nested complex data type

2013-06-20 Thread neha
Hi All, I have 2 questions about complex data types in nested composition. 1 >> I did not find a way to provide delimiter information in DDL if one or more column has nested array/struct. In this case, default delimiter has to be used for complex type column. Please let me know if this is a limit