phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Parth Sawant <parth.sawan...@gmail.com>
Subject Re: TinyInt, SmallInt not supported in Pig Phoenix loader
Date Wed, 17 Feb 2016 01:37:03 GMT
Update: The same method doesn't work for writing into SMALLINT columns in a
Phoenix table, ie a 'bytearray' field in Pig can be written into a TINYINT
column in Phoenix table but not into a SMALLINT column.

On Tue, Feb 16, 2016 at 3:51 PM, Parth Sawant <parth.sawant90@gmail.com>
wrote:

> Hi
> We are using the Pig-Phoenix Bulkload integration to load data into a
> table. We realize that Pig does not support TINYINT and SMALLINT datatypes.
> So we are declaring those fields as INT in Pig but trying to write them
> into a Phoenix TINYINT datatype. I suppose we're looking to write/cast an
> INT in PIG to a TINYINT/SMALLINT in Phoenix. The only way we found around
> this was to declare the Pig fields with the type BYTEARRAY and then write
> them into TINYINT columns in a Phoenix table. Is there a more refined way
> of doing this?
>
> On Sat, Feb 13, 2016 at 10:10 AM, anil gupta <anilgupta84@gmail.com>
> wrote:
>
>> I think, Ravi answered my question. One of my team mate was working on
>> Pig-Phoenix loader so i'll share this with him. We will update once we try
>> this out.
>> Thanks Guys.
>>
>> On Sat, Feb 13, 2016 at 10:01 AM, James Taylor <jamestaylor@apache.org>
>> wrote:
>>
>>> I think the question Anil is asking is "Does Pig have support for
>>> TinyInt (byte) and SmallInt (short)?" I don't know the answer.
>>>
>>> On Sat, Feb 13, 2016 at 9:46 AM, Ravi Kiran <maghamravikiran@gmail.com>
>>> wrote:
>>>
>>>> Hi Anil,
>>>>
>>>>    We do a mapping of PTintInt and PSmallInt to Pig DataType.INTEGER .
>>>> https://github.com/apache/phoenix/blob/master/phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java#L94
>>>> .  Can you please share the error you are seeing.
>>>>
>>>> HTH
>>>>
>>>> Ravi.
>>>>
>>>> On Sat, Feb 13, 2016 at 3:16 AM, anil gupta <anilgupta84@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> We are using Pig-Phoenix loader to load data into a table. Initially,
>>>>> we created some columns as TinyInt and SmallInt in our Phoenix table.
But,
>>>>> Pig does not have TinyInt and SmallInt datatypes, so we were forced to
>>>>> convert all TinyInt and SmallInt columns into INTEGER.
>>>>> Is there a way/trick we can still use TinyInt and SmallInt in Phoenix
>>>>> table while using Pig-Phoenix loader?
>>>>>
>>>>> If currently there is no way to do it, can we enhance Pig-Phoenix
>>>>> loader to support TinyInt and SmallInt?
>>>>>
>>>>> --
>>>>> Thanks & Regards,
>>>>> Anil Gupta
>>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> Thanks & Regards,
>> Anil Gupta
>>
>
>

Mime
View raw message