sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Jarcec Cecho (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SQOOP-1267) Add functionality to export a subset of columns ignoring columns other than the ones in "--columns" list
Date Wed, 15 Jan 2014 15:41:19 GMT

     [ https://issues.apache.org/jira/browse/SQOOP-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jarek Jarcec Cecho updated SQOOP-1267:
--------------------------------------

    Affects Version/s:     (was: 2.0.0)
                       1.4.4

I'm changing the affected version from "2.0.0" to "1.4.4" as this JIRA clearly describes Sqoop
1 and not Sqoop 2.

> Add functionality to export a subset of columns ignoring columns other than the ones
in "--columns" list
> --------------------------------------------------------------------------------------------------------
>
>                 Key: SQOOP-1267
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1267
>             Project: Sqoop
>          Issue Type: Improvement
>          Components: sqoop2-framework
>    Affects Versions: 1.4.4
>            Reporter: bharath v
>            Priority: Minor
>
> Currently we can export a subset of columns with --columns flag (SQOOP-503). However,
other columns are reported as NULLS in the final table. Instead we can add a flag that eliminates
the columns other than the ones in --columns flag. This way we can just export a subset of
columns ignoring others.
> Example: 
> Sample file is as follows:- 
> {code}
> 12|jithin|aluva|good 
> 23|syam|aluva|good 
> 34|john|prbr|cool 
> 35|ramesh|ankly|fare 
> {code}
> MYSQL sample table is having the following schema:- 
> {code}
> | id | name | place | comments | 
> {code}
> we executed the sqoop command as :- 
> {code}
> sqoop export --connect jdbc:mysql://hostname/test --username uname -P --export-dir /user/johnj2/sqoopexport/
--input-fields-terminated-by '|' --table sqooptest --columns name,place 
> {code}
> Job went success and data is exported into mysql as follows :- 
> {code}
> +------+------+--------+----------+ 
> | id | name | place | comments | 
> +------+------+--------+----------+ 
> | NULL | 35 | ramesh | NULL | 
> | NULL | 12 | jithin | NULL | 
> | NULL | 23 | syam | NULL | 
> | NULL | 34 | john | NULL | 
> +------+------+--------+----------+ 
> {code}
> Instead we can add a flag that ignores columns id and comments.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message