Thank you Gwen, As you described, the user didn't have access to the table.
On Tue, Sep 30, 2014 at 4:25 PM, Gwen Shapira <[email protected]> wrote: > The statement with "where 1=0" is generated just to get list of > columns. We run the actual select in the MR job later on. > (You can check in your job tracker or YARN logs). > > I suspect that "cities" table doesn't belong to SYSTEM user. Either > log in as the user that owns cities or use --schema flag to specify > the schema. > > Gwen > > On Tue, Sep 30, 2014 at 10:55 AM, foo bar <[email protected]> wrote: > > Hi, I'm trying to import a dummy table (cities) into HDFS with the > > following command: > > > > $ sqoop import --connect jdbc:oracle:thin:@10.0.2.15:1521/XE --username > > system --password root --table cities --columns country,city --split-by > id > > --target-dir /sqoop/output1 > > > > but no rows get imported. > > > > The SQL statement that gets generated by Sqoop is > > > > SELECT t.* FROM cities t WHERE 1=0 > > > > which is odd because 1 will never be equal to zero. > > > > I'm running: > > Hadoop 2.4.1 > > Sqoop 1.4.5 > > > > Any help is greatly appreciated. >
