Skip to content

Instantly share code, notes, and snippets.

@mtustin-handy
Last active December 3, 2015 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtustin-handy/c4f90aaf18aafdefb856 to your computer and use it in GitHub Desktop.
Save mtustin-handy/c4f90aaf18aafdefb856 to your computer and use it in GitHub Desktop.
Importing GIS data from MySQL into Hive as a string
sqoop-import --connect jdbc:mysql://<hostname>:3306/handy \
--username <user> --table geodata_table \
--target-dir /path/to/tables/geodata_table\
--fetch-size -2147483648 --null-string \\\\N --null-non-string \\\\N\
--map-column-hive area=STRING --delete-target-dir --hive-import\
--hive-database handy_db --hive-drop-import-delims --hive-overwrite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment