Hi Bob, I'm not sure how Sqoop is treating date/time values from Oracle, but Phoenix uses an 8 byte long (see http://phoenix.apache.org/language/datatypes.html). Try using UNSIGNED_DATE in your Phoenix schema. The regular types in Phoenix flip the sign bit so that we can support negative time values and get a bigger range (and so that negative dates sort before positive dates as they should). Thanks, James
On Fri, Aug 8, 2014 at 11:02 AM, Russell, Bob <[email protected]> wrote: > I have an hbase table that was populated some time ago via sqoop from an > oracle database. Of particular interest is a column (FROM_DT) which, in > oracle database,was defined as a date type. After sqooping to hbase, a scan > on the table showed the FROM_DT column as follows: > > > 5229055334*887793386509269*2 column=P4PP:FROM_DT, timestamp=1407444775221, > value=2008-07-16 00:00:00.0 > > I'm now trying to create a phoenix view on top of the hbase table, but I > seem to have trouble getting the date to appear correctly with timestamp (or > date) datatype. The phoenix view is created with: > > create view CLM_PRVDR (pk varchar primary key, p4pp.npi varchar, > p4pp.from_dt timestamp); > > And the result of the query on the view is: > +------------+------------+------------+ > | PK | NPI | FROM_DT | > +------------+------------+------------+ > | 5229055334*887793386509269*2 | 5229055334 | 177670875-09-17 > 14:56:08.825630768 | > > > Any ideas what I'm doing wrong? 2008-07-16 00:00:00.0 is turned into > 177670875-09-17 14:56:08.825630768 > > Thanks.
