Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> Overwrite by selected data from table itself?


+
Bhathiya Jayasekara 2013-05-29, 09:16
+
Stephen Sprague 2013-05-29, 19:16
Copy link to this message
-
Re: Overwrite by selected data from table itself?
I've done in this way many times , there must be some errors in your script
, you may paste your script here.
2013/5/30 Stephen Sprague <[EMAIL PROTECTED]>

> i think it's a clever idea.   Can you reproduce this behavior via a simple
> example and show it here?   I ran a test on hive 0.80 and it worked as you
> would expect.
>
> Regards,
> Stephen.
>
> hisql>select * from junk;
> +-----+
> | _c0 |
> +-----+
> | 1   |
> +-----+
> 1 affected
>
> hisql>insert overwrite table junk select * from junk where '_c0' != 1;
>
> hisql>select count(*) from junk;
> +-----+
> | _c0 |
> +-----+
> | 0   |
> +-----+
> 1 affected
>
>
> On Wed, May 29, 2013 at 2:16 AM, Bhathiya Jayasekara <
> [EMAIL PROTECTED]> wrote:
>
>> Hi all,
>>
>> I have this scenario to remove certain rows from a hive table. As far as
>> I understand, hive doesn't provide that functionality.
>>
>> So, I'm trying to select inverse of what I want to delete and overwrite
>> the table with that. What do you think of this approach?
>>
>> I tried to do it but seems it doesn't work as I expect. All data is still
>> available in the table. what's the reason if it's the correct behavior?
>>
>> Thanks.
>>
>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB