5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-04 02:39:53 +08:00

SQOOP-853: sqoop list-tables isn't returning the tables that have custom schemas'

(Vasanth kumar RJ via Jarek Jarcec Cecho)
This commit is contained in:
Jarek Jarcec Cecho 2013-02-02 15:09:02 -08:00
parent 7c5b46fb28
commit bae5604a3c
2 changed files with 10 additions and 1 deletions

View File

@ -53,3 +53,10 @@ job_descriptions
office_supplies
----
In case of postgresql, list tables command with common arguments fetches only "public" schema. For custom schema, use --schema argument to list tables of particular schema
Example
----
$ sqoop list-tables --connect jdbc:postgresql://localhost/corp --username name -P -- --schema payrolldept
employees
expenses
----

View File

@ -80,7 +80,9 @@ public void applyOptions(CommandLine in, SqoopOptions out)
/** {@inheritDoc} */
public void validateOptions(SqoopOptions options)
throws InvalidOptionsException {
if (hasUnrecognizedArgs(extraArguments)) {
options.setExtraArgs(getSubcommandArgs(extraArguments));
int dashPos = getDashPosition(extraArguments);
if (hasUnrecognizedArgs(extraArguments, 0, dashPos)) {
throw new InvalidOptionsException(HELP_STR);
}