Have you simply tried

INSERT OVERWRITE TABLE destination
SELECT col1, col2, col3
FROM source
WHERE col4 = 'abc'

Thanks!



On Tue, Jul 30, 2013 at 8:25 PM, Sha Liu <lius...@hotmail.com> wrote:

> Hi Hive Gurus,
>
> When using the Hive extension of multiple inserts, can we add Where
> clauses for each Select statement, like the following?
>
> FROM ...
> INSERT OVERWRITE TABLE ...
>     SELECT col1, col2, col3
>     *WHERE col4='abc'*
> INSERT OVERWRITE TABLE ...
>     SELECT col1, col4, col2
>     *WHERE col3='xyz'*
> *
> *
> The underlined parts didn't cause any errors, but they didn't seem to be
> effective either (I'm using Hive 0.9). Note that the columns used in the
> Where clauses are not among the selected ones, but I'm not sure if that is
> important. Is this kind of operations supported?
>
> Thanks,
> Sha Liu
>

Reply via email to