Re: how to join like a "In A but not in B" operation?

2012-03-11 Thread Evan Pollan
I used a left outer join with a constraint on a joined row column value being null -- logically equivalent to a "not in" clause. Looks funny, but it works. On Mar 11, 2012, at 10:52 PM, "Richard" mailto:codemon...@163.com>> wrote: hi, how can I join two tables A and B so that the result is "I

Re: Custom SerDe -- tracking down stack trace

2012-02-22 Thread Evan Pollan
ently based on the query plan? From: Evan Pollan mailto:evan.pol...@bazaarvoice.com>> Reply-To: mailto:user@hive.apache.org>> Date: Wed, 22 Feb 2012 12:28:26 + To: "user@hive.apache.org<mailto:user@hive.apache.org>" mailto:user@hive.apache.org>> Subject: Re: Cu

Re: Custom SerDe -- tracking down stack trace

2012-02-22 Thread Evan Pollan
pointer was being thrown on deserialize? what is actually null? Matt On Tue, Feb 21, 2012 at 11:01 PM, Evan Pollan mailto:evan.pol...@bazaarvoice.com>> wrote: One more data point: I can read data from this partition as long as I don't reference the partition explicitly… E.g., I my partit

Re: Custom SerDe -- tracking down stack trace

2012-02-21 Thread Evan Pollan
lDate="test". This works: 'select * from table where '. And this works: 'select * from table where ArrivalDate="2012-02-01"' But, this fails: 'select * from table where ArrivalDate="test"' Does this make sense to anybody? From: Evan Poll

Custom SerDe -- tracking down stack trace

2012-02-21 Thread Evan Pollan
I have a custom SerDe that's initializing properly and works on one data set. I built it to adapt to a couple of different data formats, though, and it's choking on a different data set (different partitions in the same table). A null pointer exception is being thrown on deserialize, that's bei

Re: query parameters in hive

2012-02-13 Thread Evan Pollan
Sure -- use -hiveconf X=Y, which allows your script to reference ${hiveconf:X} On Feb 13, 2012, at 7:19 AM, "Wojciech Langiewicz" wrote: > Hello, > Is it possible (and how) to pass parameters to hive scripts from command > line? > I would imagine something like: > hive -f xyz.sql -p date='2012

Re: Delimiters for nested structures

2012-02-09 Thread Evan Pollan
+1. I've had good luck with json and get_json_object. On Feb 9, 2012, at 7:39 AM, "Tucker, Matt" mailto:matt.tuc...@disney.com>> wrote: What about creating a view that converts your data into JSON or XML? You can then make use of the get_json_object

Re: Partition deletion w/out using a literal partition value

2012-02-05 Thread Evan Pollan
our best bet is to write a shell script that executes 'show partitions ;', and then loop through the results and drop any partitions that meet your criteria. You can then create a cron job to regularly execute the shell script. Matt On Sun, Feb 5, 2012 at 5:10 PM, Evan Pollan mailto:evan.

Partition deletion w/out using a literal partition value

2012-02-05 Thread Evan Pollan
I have an environment where I'm partitioning data in some hive tables by day. I'd like to be able to delete data that's older than 1 week in some tables and 1 month in others. It appears that ALTER TABLE DROP PARTITION only supports a partition spec that equates a partition with a literal val