Sqoop from Postgre to Hive and convert to ORC format
I'm trying to sqoop some tables from Postgres to Hive and convert them to ORC while sqooping.
1. I used the below command.
sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql://<host>/<database> --username user --password pwd --table table --hcatalog-database default --hcatalog-table table --hcatalog-storage-stanza "stored as orcfile" --create-hcatalog-table -m 1
I was getting the below error:
ERROR tool.ImportTool: Import failed: org.apache.hive.hcatalog.common.HCatException : 2016 : Error operation not supported : Store into a transactional table default.agent from Pig/Mapreduce is not supported
2. I changed the sqoop to look like this.
sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql://<host>/<database> --username user --password pwd --table table --hcatalog-database default --hcatalog-table table --hcatalog-storage-stanza "stored as orcfile tblproperties (\"transactional\"=\"false\")" --create-hcatalog-table -m 1
Error:
3. and I added the below after some googling,
sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql://<host>/<database> --username user --password pwd --table table --hcatalog-database default --hcatalog-table table --hcatalog-storage-stanza "stored as orcfile tblproperties (\"transactional\"=\"false\")" --create-hcatalog-table --hcatalog-external-table -m 1
sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql://<host>/<database> --username user --password pwd --table table --hcatalog-database default --hcatalog-external-table table --hcatalog-storage-stanza "stored as orcfile tblproperties (\"transactional\"=\"false\")" --create-hcatalog-table -m 1
I tried both given above,
This is the Error:

