I need complete list of SQL Server datatypes converted to hive in sqoop.
Like SQL Server's timestamp
is converted to hive string
, SQL Server varchar
is converted to hive string
, etc.
Where can I find this complete mapping?
I need complete list of SQL Server datatypes converted to hive in sqoop.
Like SQL Server's timestamp
is converted to hive string
, SQL Server varchar
is converted to hive string
, etc.
Where can I find this complete mapping?
For Java mapping
Query is used. It will fetch no records but metadata.
Useful source code:
Then it uses
ResulSetMetadata
to find datatypes.Useful source code for generic JDBC,
Mapping from
--map-column-java
is overridden on this mapping.For Hive Mapping
This mapping is used:
Check source code here.
Mapping from
--map-column-hive
is overridden on this mapping.Sqoop is preconfigured to map most SQL types to appropriate Java or Hive representatives. However the default mapping might not be suitable for everyone and might be overridden.
See Sqoop user guide: https://sqoop.apache.org/docs/1.4.3/SqoopUserGuide.html#_controlling_type_mapping
Also some other config properties may affect type mapping, like
sqoop.bigdecimal.format.string
, etcProbably you need to study source codes for complete list of preconfigured mappings. But specifying them as --map-column-java or --map-column-hive gives you more control. You can generate mappings from target tables metadata.