I have a query that returns the proper results:

SELECT TRANSFORM(actor_id) USING '/my/script.rb' AS (actor_id, percentile, count) FROM (SELECT actor_id FROM activities CLUSTER BY actor_id) actors;

But when I do

INSERT OVERWRITE TABLE percentiles
SELECT TRANSFORM(actor_id) USING '/my/script.rb' AS (actor_id, percentile, count) FROM (SELECT actor_id FROM activities CLUSTER BY actor_id) actors;

It says it loads data into the percentiles table but when I ask for data from that table I get:

hive> SELECT actor_id, percentile, count FROM percentiles;
FAILED: Error in semantic analysis: org.apache.hadoop.hive.ql.metadata.HiveException: Path /user/hive/ warehouse/percentiles not a valid path

$ hadoop fs -ls /user/hive/warehouse/percentiles/
Found 1 items
-rw-r--r-- 1 Josh supergroup 0 2009-01-11 21:45 /user/hive/ warehouse/percentiles/attempt_200901112100_0010_r_000000_0

It's nothing but an empty file.

Am I doing something wrong?

Josh Ferguson

Reply via email to