QnaList > Groups > Sqoop-User > Jul 2013
faq

Data Import Via Sqoop From Postgresql To HDFS

Hi everyone,
I had another problem while trying to import or list tables on postgresql
via sqoop.
I am using this command
./sqoop list-databases --connect jdbc:postgresql://
192.168.194.158:5432/pgsql --username pgsql -P
It does see only the tables under the public schema, other are not listed.
i tried to change postgresql user settings now, actually is there any
options to list all tables in my database in sqoop?
OR I need to struggle with user-rights in postgresql?
Thanks.

asked Jul 21 2013 at 04:18

Fatih Haltas 's gravatar image



4 Replies for : Data Import Via Sqoop From Postgresql To HDFS
Hi Fatih,
The list-database tool seems to be working with only one schema at the time. You can specify extra argument --schema to specify schema other than the default "public", for example:
  sqoop list-tables --connect ... -- --schema private_schema
Jarcec

answered Jul 21 2013 at 07:54

Jarek Jarcec Cecho 's gravatar image


Hi Jarek,
Thanks for your help. But I am using sqoop 1.4.3 but --schema version did
not work for me.

answered Jul 22 2013 at 01:39

Fatih Haltas 's gravatar image


Is there any --schema option to be able to list schemas other than public,
because, I am not able to list other tables under non-public schemas?

answered Jul 22 2013 at 02:18

Fatih Haltas 's gravatar image


Hi Fatih,
the --schema extra parameter was added in 1.4.3 via SQOOP-601. It's however extra parameter and not a normal Sqoop parameter. As a result it needs to be specified in the extra argument section of the command line. For example:
  sqoop list-tables --connect ... -- --schema private_schema
Please do notice the extra "--" between normal sqoop arguments and extra arguments.
You might be interested in taking a look into Apache Sqoop Cookbook [1] where all different types of parameters are further described.
Jarcec
Links:
1: http://shop.oreilly.com/product/0636920029519.do

answered Jul 22 2013 at 07:50

Jarek Jarcec Cecho 's gravatar image


Related discussions

Tagged

Group Sqoop-user

asked Jul 21 2013 at 04:18

active Jul 22 2013 at 07:50

posts:5

users:2

©2013 QnaList.com . QnaList is part of ZisaTechnologies LLC.