Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

How to automatically sync a MySQL table with a Hive external table using Sqoop?

avatar
New Member

I'm already having a MySQL table in my local machine (Linux) it self, and I have a Hive external table with the same schema as the MySQL table.

I'm trying to import data from MySQL table to my Hive external table and I'm using sqoop for this.

But then the problem is, whenever a new record is being added to the MySQL table, it doesn't update the Hive external table automatically?

This is the sqoop import command I'm using:

sqoop import --connect jdbc:mysql://localhost:3306/sqoop --username root -P --split-by id --columns id,name,age,salary --table customer --target-dir /user/chamith/mysqlhivetest/ --fields-terminated-by ","  --hive-import --hive-table test.customers

Am I missing something over here? Or how can this be done?

Any help could be appreciated.

1 ACCEPTED SOLUTION

avatar
@Kulasangar Gowrisangar

You need to save a sqoop job for it to happen automatically.

You can follow this article:

https://dwbi.org/etl/bigdata/195-sqoop-merge-incremental-extraction-from-oracle

View solution in original post

3 REPLIES 3

avatar
@Kulasangar Gowrisangar

You need to save a sqoop job for it to happen automatically.

You can follow this article:

https://dwbi.org/etl/bigdata/195-sqoop-merge-incremental-extraction-from-oracle

avatar

@Kulasangar Gowrisangar

If this worked for you please click the accept button in the answer to close the thread.

Thanks

avatar
New Member

Thank you @rbiswas