For the meantime, you could take the last version of the patch and manually
apply it to Sqoop. For that you will have to check out the sources, apply
patch and compile to produce the binaries.

Thanks,
Arvind

On Fri, Oct 7, 2011 at 10:50 AM, Walter Chang <weidezhang2...@gmail.com>wrote:

> Is there any temporary solution I can use to import again to enable
> tiny(1) to be imported as number ?
>
> On Oct 7, 10:48 am, "arv...@cloudera.com" <arv...@cloudera.com> wrote:
> > [Moving conversation to sqoop-u...@incubator.apache.org. Please
> subscribe to
> > that list.]
> >
> > We are working on SQOOP-342 which will allow you to override type
> mappings.
> > Once it is committed, you will be able to specify your own mappings for
> > individual columns.
> >
> > https://issues.apache.org/jira/browse/SQOOP-342
> >
> > Thanks,
> > Arvind
> >
> > On Fri, Oct 7, 2011 at 9:53 AM, Walter Chang <weidezhang2...@gmail.com
> >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hi,
> >
> > > It seems when sqoop trying to import tiny(1)  , it goes to boolean
> > > type in hive. However, tiny(1) in my mysql table is really a number.
> > > How can I disable the boolean type conversion and make it a number.
> > > Following is the example: (day_num field).
> >
> > > here are version info:
> > > mysql  Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (i486) using
> > > readline 6.1
> > > mysql-connector-java-5.1.18
> > > Sqoop 1.3.0-cdh3u1
> >
> > > mysql> select * from xxx limit 5;
> > > +----+---------+------------+---------------------+-------------
> > > +--------+------------+----------+
> > > | ID | DAY_NUM | ENT_SEQ_NO | CREATE_DATE         | UPDATE_DATE |
> > > SOURCE | START_TIME | END_TIME |
> > > +----+---------+------------+---------------------+-------------
> > > +--------+------------+----------+
> > > |  0 |       0 |          1 | 2011-06-15 06:54:38 | NULL        |
> > > 2.0.4  | 00:00:00   | 23:59:59 |
> > > |  0 |       1 |          1 | 2011-06-15 06:54:38 | NULL        |
> > > 2.0.4  | 00:00:00   | 23:59:59 |
> > > |  0 |       2 |          1 | 2011-06-15 06:54:38 | NULL        |
> > > 2.0.4  | 00:00:00   | 23:59:59 |
> > > |  0 |       3 |          1 | 2011-06-15 06:54:38 | NULL        |
> > > 2.0.4  | 00:00:00   | 23:59:59 |
> > > |  0 |       4 |          1 | 2011-06-15 06:54:38 | NULL        |
> > > 2.0.4  | 00:00:00   | 23:59:59 |
> > > +----+---------+------------+---------------------+-------------
> > > +--------+------------+----------+
> > > 5 rows in set (0.00 sec)
> >
> > > mysql> describe day_parting
> > >    -> ;
> > > +-------------+---------------------+------+-----+---------+-------+
> > > | Field       | Type                | Null | Key | Default | Extra |
> > > +-------------+---------------------+------+-----+---------+-------+
> > > | ID          | int(10) unsigned    | NO   | PRI | 0       |       |
> > > | DAY_NUM     | tinyint(1) unsigned | NO   | PRI | 7       |       |
> > > | ENT_SEQ_NO  | tinyint(2) unsigned | NO   | PRI | 1       |       |
> > > | CREATE_DATE | datetime            | NO   |     | NULL    |       |
> > > | UPDATE_DATE | datetime            | YES  |     | NULL    |       |
> > > | SOURCE      | varchar(32)         | NO   |     |         |       |
> > > | START_TIME  | time                | NO   |     | NULL    |       |
> > > | END_TIME    | time                | NO   |     | NULL    |       |
> > > +-------------+---------------------+------+-----+---------+-------+
> > > 8 rows in set (0.00 sec)
> >
> > > However, after sqoop importing, Hive shows :
> >
> > > id      int
> > > day_num boolean
> > > ent_seq_no      tinyint
> > > create_date     string
> > > update_date     string
> > > source  string
> > > start_time      string
> > > end_time        string
> >
> > > 0       false   1       2011-06-15 06:54:38.0   null    2.0.4
> 00:00:00
> > >      23:59:59
> > > 7       false   1       2011-03-23 07:38:39.0   2011-03-23 07:38:39.0
> > > IO#DishROI32011
> > > 12:30:00        15:30:00
> > > 16      false   1       2011-04-01 09:31:28.0   2011-04-01 09:31:28.0
> > > IO#KDA032011
> > > 00:00:00        17:00:00
> > > 17      false   1       2011-04-01 09:33:20.0   2011-04-01 09:33:20.0
> > > IO#Direc20110215        17:00:00        23:59:00
> > > 19      false   1       2011-04-12 04:46:43.0   2011-04-12 04:46:43.0
> > > IO#buycalls2011
> > > 12:30:00        15:30:00
> >
> > > --
> > > NOTE: The mailing list sqoop-u...@cloudera.org is deprecated in favor
> of
> > > Apache Sqoop mailing list sqoop-u...@incubator.apache.org. Please
> > > subscribe to it by sending an email to
> > > incubator-sqoop-user-subscr...@apache.org.
>
> --
> NOTE: The mailing list sqoop-u...@cloudera.org is deprecated in favor of
> Apache Sqoop mailing list sqoop-user@incubator.apache.org. Please
> subscribe to it by sending an email to
> incubator-sqoop-user-subscr...@apache.org.
>

Reply via email to