How to export data from Hadoop to MySQL /any DB? -


most of tutorials i've researched point me have use sqoop export/import , lot of manuals show how can export data db hdfs, how can backwards case?

let's say, have company db on localhost, has empty users table columns: id, user , have hadoop provides me data (id, user) saves hadoop-output.txt not mysql.

are there commands command line make import hdfs mysql via sqoop?

sqoop-export this.

sqoop-export --connect jdbc:mysql://localhost/company               --username user --password passwd               --table users               --export-dir /path/to/hdfs_source              --input-fields-terminated-by ',' 

refer sqoopuserguide.html#sqoop_export


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -