[jira] [Updated] (SQOOP-489) Cannot define partition keys for Hive tables created through Sqoop
[ https://issues.apache.org/jira/browse/SQOOP-489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Abhijeet Gaikwad updated SQOOP-489: --- Fix Version/s: 1.4.2 > Cannot define partition keys for Hive tables created through Sqoop > -- > > Key: SQOOP-489 > URL: https://issues.apache.org/jira/browse/SQOOP-489 > Project: Sqoop > Issue Type: Bug >Affects Versions: 1.4.1-incubating >Reporter: Kathleen Ting >Assignee: Cheolsoo Park > Fix For: 1.4.2 > > Attachments: SQOOP-489.patch, SQOOP-489.patch, SQOOP-489.patch > > > By enabling the table option, Sqoop includes every column in the table in the > create table query, and by enabling the hive-partition-key option, Sqoop > blindly appends the "partitioned by" clause. Now if you specify one of > columns in the table in the hive-partition-key, this will cause a syntax > error in Hive. > For example, if we have a table 'FOO' that has columns 'I' and 'J': > sqoop create-hive-table --table FOO ... > will generate the following Hive query: > CREATE TABLE IF NOT EXISTS `FOO` ( `I` STRING, `J` STRING) > Now if we add "--hive-partition-key I" to the command, Sqoop generates the > following query: > CREATE TABLE IF NOT EXISTS `FOO` ( `I` STRING, `J` STRING) PARTITIONED BY (I > STRING) > The problem is that since 'I' is defined twice (once in CRATE TABLE and once > in PARTITIONED BY), this is a syntax error in Hive. > This correct query would be something like: > CREATE TABLE IF NOT EXISTS `FOO` (`J` STRING) PARTITIONED BY (I STRING) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SQOOP-489) Cannot define partition keys for Hive tables created through Sqoop
[ https://issues.apache.org/jira/browse/SQOOP-489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Cheolsoo Park updated SQOOP-489: Attachment: SQOOP-489.patch > Cannot define partition keys for Hive tables created through Sqoop > -- > > Key: SQOOP-489 > URL: https://issues.apache.org/jira/browse/SQOOP-489 > Project: Sqoop > Issue Type: Bug >Affects Versions: 1.4.1-incubating >Reporter: Kathleen Ting >Assignee: Cheolsoo Park > Attachments: SQOOP-489.patch, SQOOP-489.patch, SQOOP-489.patch > > > By enabling the table option, Sqoop includes every column in the table in the > create table query, and by enabling the hive-partition-key option, Sqoop > blindly appends the "partitioned by" clause. Now if you specify one of > columns in the table in the hive-partition-key, this will cause a syntax > error in Hive. > For example, if we have a table 'FOO' that has columns 'I' and 'J': > sqoop create-hive-table --table FOO ... > will generate the following Hive query: > CREATE TABLE IF NOT EXISTS `FOO` ( `I` STRING, `J` STRING) > Now if we add "--hive-partition-key I" to the command, Sqoop generates the > following query: > CREATE TABLE IF NOT EXISTS `FOO` ( `I` STRING, `J` STRING) PARTITIONED BY (I > STRING) > The problem is that since 'I' is defined twice (once in CRATE TABLE and once > in PARTITIONED BY), this is a syntax error in Hive. > This correct query would be something like: > CREATE TABLE IF NOT EXISTS `FOO` (`J` STRING) PARTITIONED BY (I STRING) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SQOOP-489) Cannot define partition keys for Hive tables created through Sqoop
[ https://issues.apache.org/jira/browse/SQOOP-489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Cheolsoo Park updated SQOOP-489: Attachment: SQOOP-489.patch > Cannot define partition keys for Hive tables created through Sqoop > -- > > Key: SQOOP-489 > URL: https://issues.apache.org/jira/browse/SQOOP-489 > Project: Sqoop > Issue Type: Bug >Affects Versions: 1.4.1-incubating >Reporter: Kathleen Ting >Assignee: Cheolsoo Park > Attachments: SQOOP-489.patch, SQOOP-489.patch > > > By enabling the table option, Sqoop includes every column in the table in the > create table query, and by enabling the hive-partition-key option, Sqoop > blindly appends the "partitioned by" clause. Now if you specify one of > columns in the table in the hive-partition-key, this will cause a syntax > error in Hive. > For example, if we have a table 'FOO' that has columns 'I' and 'J': > sqoop create-hive-table --table FOO ... > will generate the following Hive query: > CREATE TABLE IF NOT EXISTS `FOO` ( `I` STRING, `J` STRING) > Now if we add "--hive-partition-key I" to the command, Sqoop generates the > following query: > CREATE TABLE IF NOT EXISTS `FOO` ( `I` STRING, `J` STRING) PARTITIONED BY (I > STRING) > The problem is that since 'I' is defined twice (once in CRATE TABLE and once > in PARTITIONED BY), this is a syntax error in Hive. > This correct query would be something like: > CREATE TABLE IF NOT EXISTS `FOO` (`J` STRING) PARTITIONED BY (I STRING) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SQOOP-489) Cannot define partition keys for Hive tables created through Sqoop
[ https://issues.apache.org/jira/browse/SQOOP-489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Cheolsoo Park updated SQOOP-489: Attachment: SQOOP-489.patch I need to do more testing, but this was basically what I had in mind. Please let me know if you see any problem with my approach. Thanks. > Cannot define partition keys for Hive tables created through Sqoop > -- > > Key: SQOOP-489 > URL: https://issues.apache.org/jira/browse/SQOOP-489 > Project: Sqoop > Issue Type: Bug >Affects Versions: 1.4.1-incubating >Reporter: Kathleen Ting > Attachments: SQOOP-489.patch > > > By enabling the table option, Sqoop includes every column in the table in the > create table query, and by enabling the hive-partition-key option, Sqoop > blindly appends the "partitioned by" clause. Now if you specify one of > columns in the table in the hive-partition-key, this will cause a syntax > error in Hive. > For example, if we have a table 'FOO' that has columns 'I' and 'J': > sqoop create-hive-table --table FOO ... > will generate the following Hive query: > CREATE TABLE IF NOT EXISTS `FOO` ( `I` STRING, `J` STRING) > Now if we add "--hive-partition-key I" to the command, Sqoop generates the > following query: > CREATE TABLE IF NOT EXISTS `FOO` ( `I` STRING, `J` STRING) PARTITIONED BY (I > STRING) > The problem is that since 'I' is defined twice (once in CRATE TABLE and once > in PARTITIONED BY), this is a syntax error in Hive. > This correct query would be something like: > CREATE TABLE IF NOT EXISTS `FOO` (`J` STRING) PARTITIONED BY (I STRING) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SQOOP-489) Cannot define partition keys for Hive tables created through Sqoop
[ https://issues.apache.org/jira/browse/SQOOP-489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kathleen Ting updated SQOOP-489: Summary: Cannot define partition keys for Hive tables created through Sqoop (was: Cannot define partition keys for Hive tables create through sqoop) > Cannot define partition keys for Hive tables created through Sqoop > -- > > Key: SQOOP-489 > URL: https://issues.apache.org/jira/browse/SQOOP-489 > Project: Sqoop > Issue Type: Bug >Affects Versions: 1.4.1-incubating >Reporter: Kathleen Ting > > By enabling the table option, Sqoop includes every column in the table in the > create table query, and by enabling the hive-partition-key option, Sqoop > blindly appends the "partitioned by" clause. Now if you specify one of > columns in the table in the hive-partition-key, this will cause a syntax > error in Hive. > For example, if we have a table 'FOO' that has columns 'I' and 'J': > sqoop create-hive-table --table FOO ... > will generate the following Hive query: > CREATE TABLE IF NOT EXISTS `FOO` ( `I` STRING, `J` STRING) > Now if we add "--hive-partition-key I" to the command, Sqoop generates the > following query: > CREATE TABLE IF NOT EXISTS `FOO` ( `I` STRING, `J` STRING) PARTITIONED BY (I > STRING) > The problem is that since 'I' is defined twice (once in CRATE TABLE and once > in PARTITIONED BY), this is a syntax error in Hive. > This correct query would be something like: > CREATE TABLE IF NOT EXISTS `FOO` (`J` STRING) PARTITIONED BY (I STRING) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira