You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by mahender bigdata <Ma...@outlook.com> on 2015/12/23 18:00:57 UTC
Null Representation in Hive tables
Hi,
Is there any possibility of mentioning
both*"serialization.null.format"="" and
**"serialization.null.format"="\000" *has table properties, currently we
are creating external table, where there is chance of having data with
empty string or \000, As a work around, we have created 2 external
tables, one with "serialization.null.format"="" has table property and
another with "serialization.null.format"="\000" where we insert data
from external table 1 to table 2. Is there way to reduce to single step
having mentioning both *"serialization.null.format"="" and
**"serialization.null.format"="\000"*in the same table property.
Thanks,
Mahender
Re: Null Representation in Hive tables
Posted by Gopal Vijayaraghavan <go...@apache.org>.
> Your best bet is take the serde you s re using and copy it and change
>the code to accept bith null types
Or use a view with an IF().
For instance, I like the ease of generating groovy UDFs inline for
quick-n-dirty state machines.
We now do column pruning into views, so if you do not select that column
it should not run the UDF unecessarily.
Most of the times I use a CTE, I really wish there was a "CREATE TEMPORARY
VIEW" for me to avoid prefixing all queries.
Cheers,
Gopal
Re: Null Representation in Hive tables
Posted by Edward Capriolo <ed...@gmail.com>.
Your best bet is take the serde you s re using and copy it and change the
code to accept bith null types
On Sunday, December 27, 2015, mahender bigdata <Ma...@outlook.com>
wrote:
> Can any one update on this
>
> On 12/23/2015 9:37 AM, mahender bigdata wrote:
>
> Our Files are not text Files, they are csv and dat. Any possibility to
> include 2 serialization.null format in table property
>
> On 12/23/2015 9:16 AM, Edward Capriolo wrote:
>
> In text formats the null is accepted as \N.
>
> On Wed, Dec 23, 2015 at 12:00 PM, mahender bigdata <
> <javascript:_e(%7B%7D,'cvml','Mahender.BigData@outlook.com');>
> Mahender.BigData@outlook.com
> <javascript:_e(%7B%7D,'cvml','Mahender.BigData@outlook.com');>> wrote:
>
>> Hi,
>>
>> Is there any possibility of mentioning both*
>> "serialization.null.format"="" and **"serialization.null.format"="\000"
>> *has table properties, currently we are creating external table, where
>> there is chance of having data with empty string or \000, As a work
>> around, we have created 2 external tables, one with "serialization.null.format"=""
>> has table property and another with "serialization.null.format"="\000"
>> where we insert data from external table 1 to table 2. Is there way to
>> reduce to single step having mentioning both *"serialization.null.format"=""
>> and **"serialization.null.format"="\000"* in the same table property.
>>
>> Thanks,
>> Mahender
>>
>
>
>
>
--
Sorry this was sent from mobile. Will do less grammar and spell check than
usual.
Re: Null Representation in Hive tables
Posted by mahender bigdata <Ma...@outlook.com>.
Can any one update on this
On 12/23/2015 9:37 AM, mahender bigdata wrote:
> Our Files are not text Files, they are csv and dat. Any possibility to
> include 2 serialization.null format in table property
>
> On 12/23/2015 9:16 AM, Edward Capriolo wrote:
>> In text formats the null is accepted as \N.
>>
>> On Wed, Dec 23, 2015 at 12:00 PM, mahender bigdata
>> <Ma...@outlook.com> wrote:
>>
>> Hi,
>>
>> Is there any possibility of mentioning
>> both*"serialization.null.format"="" and
>> **"serialization.null.format"="\000" *has table properties,
>> currently we are creating external table, where there is chance
>> of having data with empty string or \000, As a work around, we
>> have created 2 external tables, one with
>> "serialization.null.format"="" has table property and another
>> with "serialization.null.format"="\000" where we insert data from
>> external table 1 to table 2. Is there way to reduce to single
>> step having mentioning both *"serialization.null.format"="" and
>> **"serialization.null.format"="\000"*in the same table property.
>>
>> Thanks,
>> Mahender
>>
>>
>
Re: Null Representation in Hive tables
Posted by mahender bigdata <Ma...@outlook.com>.
Our Files are not text Files, they are csv and dat. Any possibility to
include 2 serialization.null format in table property
On 12/23/2015 9:16 AM, Edward Capriolo wrote:
> In text formats the null is accepted as \N.
>
> On Wed, Dec 23, 2015 at 12:00 PM, mahender bigdata
> <Mahender.BigData@outlook.com <ma...@outlook.com>>
> wrote:
>
> Hi,
>
> Is there any possibility of mentioning
> both*"serialization.null.format"="" and
> **"serialization.null.format"="\000" *has table properties,
> currently we are creating external table, where there is chance of
> having data with empty string or \000, As a work around, we have
> created 2 external tables, one with "serialization.null.format"=""
> has table property and another with
> "serialization.null.format"="\000" where we insert data from
> external table 1 to table 2. Is there way to reduce to single step
> having mentioning both *"serialization.null.format"="" and
> **"serialization.null.format"="\000"*in the same table property.
>
> Thanks,
> Mahender
>
>
Re: Null Representation in Hive tables
Posted by Edward Capriolo <ed...@gmail.com>.
In text formats the null is accepted as \N.
On Wed, Dec 23, 2015 at 12:00 PM, mahender bigdata <
Mahender.BigData@outlook.com> wrote:
> Hi,
>
> Is there any possibility of mentioning both*
> "serialization.null.format"="" and **"serialization.null.format"="\000"
> *has table properties, currently we are creating external table, where
> there is chance of having data with empty string or \000, As a work
> around, we have created 2 external tables, one with "serialization.null.format"=""
> has table property and another with "serialization.null.format"="\000"
> where we insert data from external table 1 to table 2. Is there way to
> reduce to single step having mentioning both *"serialization.null.format"=""
> and **"serialization.null.format"="\000"* in the same table property.
>
> Thanks,
> Mahender
>