Uploaded image for project: 'Sqoop'
  1. Sqoop
  2. SQOOP-3150

issue with sqoop hive import with partitions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 1.4.6
    • Fix Version/s: no-release
    • Component/s: hive-integration
    • Labels:
    • Environment:

      Cent-Os

      Description

      Sqoop Command:

      sqoop import \
      ...
      --hive-import \
      --hive-overwrite \
      --hive-table employees_p \
      --hive-partition-key date \
      --hive-partition-value 10-03-2017 \
      --target-dir ..\
      -m 1

      hive-table script:
      employees_p is a partitioned table on date(string) column

      Issue:-
      Case1: When --target-dir /user/hdfs/landing/staging/Hive/partitioned/EMPLOYEES \
      while running above sqoop command, gets an error "directory already exissts".

      When : --target-dir /user/hdfs/landing/staging/Hive/partitioned/EMPLOYEES/anyname
      2. Above sqoop command creates a hive partition (date=10-03-2017) and directory as
      '/user/hdfs/landing/staging/Hive/partitioned/EMPLOYEES/date=10-03-2017'

      Expected Behaviour:- As in sqoop command --hive-partition-key and --hive-partition-value is present, so it should auto create partioned directory inside EMPLOYEES.
      ie. '/user/hdfs/landing/staging/Hive/partitioned/EMPLOYEES/date=10-03-2017'

        Attachments

          Activity

            People

            • Assignee:
              ericlin Eric Lin
              Reporter:
              ajindal Amit Jindal
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: