How to move a Hive data table to MySql?

I would like to know how can I move a date from Hive to MySQL?

I saw an example of how to move bus data in Amazon DynamoDB, but not for RDBMS like MySQL. Here is an example that I saw with DynamoDB:

CREATE EXTERNAL TABLE tbl1 ( name string, location string ) STORED BY 'org.apache.hadoop.hive.dynamodb.DynamoDBStorageHandler' TBLPROPERTIES ("dynamodb.table.name" = "table", "dynamodb.column.mapping" = "name:name,location:location") ; 

I would like to do the same, but instead of MySQL. I wonder if I need to encode my own StorageHandler? I also do not want to use sqoop. I want to be able to execute my query directly in my HiveQL script.

+4
source share
3 answers

Currently, you need a JDBC StorageHandler that has not yet been created, but you can create your own.

There is currently an error report that you can find here:

https://issues.apache.org/jira/browse/HIVE-1555

+4
source

Have you tried using Sqoop? . It is a good tool for this kind of thing.

+1
source

There are many options. You can upload files to hive as a csv file, and then try pasting inserts into mysql tables. You can use Sqoop. Or you can use some of the popular ETL tools such as the Pentaho and many others.

+1
source

All Articles