While Trying to import data with sqoop from a postgres table to hive a got the following error :
<code>ERROR db.DBRecordReader: Top level exception:
org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8" : 0xe9 0x70 0x61
</code>
<code>ERROR db.DBRecordReader: Top level exception:
org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8" : 0xe9 0x70 0x61
</code>
ERROR db.DBRecordReader: Top level exception:
org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8" : 0xe9 0x70 0x61
The Following is the sqoop import :
<code>sqoop import --connect jdbc:postgresql://@IP/db --table table --username user --password-file /path --hive-import --hive-table db.table --target-dir /path
-m 1
</code>
<code>sqoop import --connect jdbc:postgresql://@IP/db --table table --username user --password-file /path --hive-import --hive-table db.table --target-dir /path
-m 1
</code>
sqoop import --connect jdbc:postgresql://@IP/db --table table --username user --password-file /path --hive-import --hive-table db.table --target-dir /path
-m 1
while searching for a solution a found that (Command : SHOW server_encoding):
<code>------------------------
| server_encoding |
------------------------
| SQL_ASCII |
------------------------
</code>
<code>------------------------
| server_encoding |
------------------------
| SQL_ASCII |
------------------------
</code>
------------------------
| server_encoding |
------------------------
| SQL_ASCII |
------------------------
and the client encoding is set to (Command : SHOW client_encoding):
<code>------------------------
| client_encoding |
------------------------
| UTF8 |
------------------------
</code>
<code>------------------------
| client_encoding |
------------------------
| UTF8 |
------------------------
</code>
------------------------
| client_encoding |
------------------------
| UTF8 |
------------------------