lundi 20 avril 2015

Sqoop + Postgresql: how to prevent quotes around table name

I am trying to import a table from Postgresql to a Parquet file on HDFS.

Here is what I do:

sqoop import \
    --connect "jdbc:postgresql://" \
    --username user_me --password $PASSWORD \
    --table \
    --target-dir /user/me/bar \

and I get

INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM "" AS t LIMIT 1
ERROR manager.SqlManager: Error executing statement: org.postgresql.util.PSQLException: ERROR: relation "" does not exist

SELECT t.* FROM "" AS t LIMIT 1 does not work indeed, but SELECT t.* FROM AS t LIMIT 1 does. So the problem is that table name is quoted. I tried supplying --table argument different ways, but with no effect.

How do I work it around?

Aucun commentaire:

Enregistrer un commentaire