Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

Sqoop export from hive to maria db

Rising Star

Super Guru

Try DASH DASH for your arguments:



Also, best advice always try and search your errors for solutions: "sqoop Unrecognized argument: -hcatalog", "sqoop Unrecognized argument: -table"

I like to search here, stack, or google....

Master Mentor

@Gayathri Devi

Can you share your complete sqoop command


Hi @Gayathri Devi
it seems you're trying to use

The argument value for this option is the HCatalog tablename. The presence of the --hcatalog-table option signifies that the import or export job is done using HCatalog tables, and it is a required option for HCatalog jobs.

But it looks like you have an accidental space between the -hcatalog and -table, resulting in a command syntax issue;


@Gayathri Devi
Perhaps this works, i haven't tried this myself yet as I don't currently have any lab setup using mariaDB.
Edit; This may also be helpful:
I've noticed now the --export-dir is also required;

sqoop export \
--connect "jdbc:mariadb://localhost/example" \
--username mariadb \
--password mariadb \
--table hivetable \
--export-dir /apps/hive/warehouse/hivetable


@Gayathri Devi
I've created a database in MariaDB and exported a hive table using sqoop on my lab setup.
This worked well for me;

[sqoop@jsneep-lab ~]$ sqoop export --connect jdbc:mysql:// --username mariadb --password mariadb --table exported --direct --export-dir /apps/hive/warehouse/drivers

Make sure you have /usr/share/java/mysql-connector-java.jar present on your system, this gave me trouble initially.