sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin, Nick" <NiMar...@pssd.com>
Subject RE: Composite Key
Date Tue, 10 Dec 2013 19:28:27 GMT
Sorry Abe that was a bit confusing on my part.

However, I solved what I was looking to do using a free form import w/ concat of the two fields
comprising the composite PK.

Appreciate the help!

From: Abraham Elmahrek [mailto:abe@cloudera.com]
Sent: Monday, December 09, 2013 1:41 PM
To: user@sqoop.apache.org
Subject: Re: Composite Key

Hey Nick,

I'm not sure I understand what you're asking... are you asking if you can split by composite
key? I don't think that's currently possible. Splitting occurs on a single column. Are you
asking if data can make its way into HDFS (or Hive) via the composite key? You might have
to use free-form queries. You should be able to use an oracle function to concat the two columns
together. See http://sqoop.apache.org/docs/1.4.4/SqoopUserGuide.html#_free_form_query_imports
for more details on that. You should be able to use to_char (http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions181.htm)
and concat (http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions026.htm) functions.


On Mon, Dec 9, 2013 at 9:17 AM, Martin, Nick <NiMartin@pssd.com<mailto:NiMartin@pssd.com>>
I'm doing an import/export with an Oracle table that has a composite key as the PK (so PRIMARY

I dug through the Sqoop documentation and I see that I can set a composite key for HBase imports
(--hbase-row-key) but I'm wondering how/if I can use the composite key from my source Oracle
table without HBase?

Hope that makes sense...

View raw message