Home Forums Sqoop How to import data from tables with SCHEMA names using sqoop

This topic contains 3 replies, has 2 voices, and was last updated by  Koelli Mungee 11 months, 3 weeks ago.

  • Creator
    Topic
  • #43838

    Durga Prasad
    Participant

    I want to import data from HumanResources.Employee table but I was getting the following error.

    Error:
    Invalid object name ‘HumanResources.Employee’.
    DB Name: AdventureWorks2012
    Table: HumanResources.Employee

    SQOOP Command:
    sqoop import -connect “jdbc:sqlserver://localhost:1433;Database=AdventureWorks2012;username=sqoop;password=sqoop;” -table HumanResources.Employee -target-dir /user/data/durga -m 1

    Any help would be appreciated.

    Thanks
    Durga

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How to import data from tables with SCHEMA names using sqoop’ is closed to new replies.

  • Author
    Replies
  • #44777

    Koelli Mungee
    Moderator

    Hi Durga,

    This is an example of running an import to sqlserver:

    sqoop-import –connect “jdbc:sqlserver://10.10.20.8:1433;databaseName=dave” –driver com.microsoft.sqlserver.jdbc.SQLServerDriver –username hive –password hive –query “select test.dave as NUMBER, test.test as DATA from test where \$CONDITIONS” –split-by test.dave –as-avrodatafile -m1 –target-dir /data/sub/cca/fpcondtl/stg5hash/

    Let me know if this helps, if not please post the full error you are getting along with the full command/verbose output.

    Regards
    Koelli

    Collapse
    #43906

    Durga Prasad
    Participant

    Hi Koelli,

    I am using Sqoop 1.4.2 version only and There is no information about tables with schema name in the given link. Please share any other links.

    provided link:

    http://sqoop.apache.org/docs/1.4.2/SqoopUserGuide.html

    Thanks
    Durga

    Collapse
    #43882

    Koelli Mungee
    Moderator

    Hi Durga,

    What version of Sqoop are you using? Did you start looking at the sqoop user guide?

    http://sqoop.apache.org/docs/1.4.2/SqoopUserGuide.html

    Regards
    Koelli

    Collapse
Viewing 3 replies - 1 through 3 (of 3 total)