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
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
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?
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
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 ARRAYSTRUCTfoo:String, bar:INT);
I then used an insert statement to see how Hive would store the records, so
I could populate the real table with
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 deanwamp...@gmail.com wrote:
It's not as simple as it seems, as I discovered yesterday,