hadoop - How to load split HDFS files to Oracle database? -


i need load data split files on hdfs oracle database.

[user@asdf 007]$ hadoop dfs -ls  hdfs://xxxxxx/split_files/test_folder/test_table_with_partitions/* found 18 items drwxrwxrwx   - bigsql hdfs          0 2017-07-24 01:00 hdfs://xxxxxx/split_files/test_folder/test_table_with_partitions/tm=2017-07-24/dept=1 drwxrwxrwx   - bigsql hdfs          0 2017-07-24 01:00 hdfs://xxxxxx/split_files/test_folder/test_table_with_partitions/tm=2017-07-24/dept=2 drwxrwxrwx   - bigsql hdfs          0 2017-07-24 01:00 hdfs://xxxxxx/split_files/test_folder/test_table_with_partitions/tm=2017-07-24/dept=3 drwxrwxrwx   - bigsql hdfs          0 2017-07-24 01:00 hdfs://xxxxxx/split_files/test_folder/test_table_with_partitions/tm=2017-07-24/dept=4 drwxrwxrwx   - bigsql hdfs          0 2017-07-24 01:00 hdfs://xxxxxx/split_files/test_folder/test_table_with_partitions/tm=2017-07-24/dept=5 ....... 

if open files inside folder

hdfs://xxxxxx/split_files/test_folder/test_table_with_partitions/tm=2017-07-24/dept=5 

they don't have time & department information inside them. hence when use sqoop information not loaded database table.

how can information loaded database too? there option in sqoop it?

from given details hdfs files refer hive table.

to export partitioned hive table rdbms have make use of --hcatalog-table argument of sqoop. example given below, test1 hive table partitioned , being exported mysql table test.test.

sqoop export --connect jdbc:mysql://10.0.0.35:3306/test --username root --table test1 --hcatalog-table test1 

to export oracle database have replace jdbc:mysql://10.0.0.35:3306/test jdbc:oracle:thin:@<hostname>:<port>:<service>


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -