sqoop import --connect jdbc:mysql://ip-10-0-1-10.e...

Discussion in 'Big Data and Analytics' started by _27601, Jun 21, 2018.

  1. _27601

    _27601 Member
    Alumni

    Joined:
    Mar 28, 2018
    Messages:
    7
    Likes Received:
    0
    sqoop import --connect jdbc:mysql://ip-10-0-1-10.ec2.internal/retail_db --username labuser --password

    simplilearn --table customers --target-dir /batch184/sqoop-jobs/job1 --m 1

    what is the error in this ?
     
    #1
  2. Shalini Rana

    Shalini Rana Well-Known Member
    Simplilearn Support

    Joined:
    Jul 24, 2017
    Messages:
    324
    Likes Received:
    21
    Hi Learner,

    Please use the command mentioned below for Sqoop import job:

    sqoop import --connect jdbc:mysql://ip-10-0-1-10.ec2.internal/retail_db --username labuser --password simplilearn --table customers --target-dir /user/kartik_dave_convergys/batch184/sqoop-jobs/job1 --m 1

    The issue with your command was that you did not mention the complete target dir path. Please find the screenshot below:

    upload_2018-6-21_14-28-27.png

    upload_2018-6-21_14-29-7.png

    Thanks!
     
    #2
  3. Saurav gupta_1

    Saurav gupta_1 New Member

    Joined:
    Oct 1, 2019
    Messages:
    1
    Likes Received:
    0
    mysql> sqoop import --connect jdbc:mysql://ip-10-0-1-10.ec2.internal/db2304 --username labuser --password simplilearn --table emp230ok -m 2 --target-
    dir '/user/sauravgupta2304_gmail/sqoop_sql8_okemp230'
    -> ;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
    near 'sqoop import --connect jdbc:mysql://ip-10-0-1-10.ec2.internal/db2304 --username ' at line 1


    why getting this error?
     
    #3
  4. junwen chen

    junwen chen Member

    Joined:
    Jan 16, 2020
    Messages:
    11
    Likes Received:
    0
    i think berfore --connect ,there should be a space, same as before username. you can try again with sapce.
     
    #4

Share This Page