Question

Is there any way to do mapping between input column names and output Hive column names in Sqoop command line or Scoop API?

For example:

Input SQL table:
(Name STRING, Phone INT)

--> need to map into -->

Output Hive table:
(ClientName STRING, PhoneNumber INT)

I have to do this because Hive does not support Unicode in table schema and can not parse Cyrillic column names.

Was it helpful?

Solution

You can use a free-form query import (--query option) and say something like

--query 'select Name as ClientName, Phone as PhoneNumber' ...
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top