Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18470

MAP OBJECT statement ignored when working with multiple connections in HPLSQL

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.1.0
    • None
    • HiveServer2, hpl/sql
    • None

    Description

      When running the following command:

       

      /usr/hdp/2.6.3.0-235/hive2/bin/hplsql -e "
      MAP OBJECT dep TO <SCHEMA>.<TABLE> AT lptdwhconn;
      MAP OBJECT T TO <hive_table> AT hiveconn;
      INSERT INTO T (cd_department,lb_departement,cd_region,lb_region)
      SELECT d.cd_departement, d.lb_departement,d.lb_departement, d.cd_region, d.lb_region FROM dep d WHERE rownum < 2;"
      

       

      I get an Exception :

       

      Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:124 Table not found '<TABLE>'

      If i run a smilar command :

      /usr/hdp/2.6.3.0-235/hive2/bin/hplsql -e "
      MAP OBJECT dep TO <SCHEMA>.<TABLE> AT lptdwhconn;
      MAP OBJECT T TO <hive_table> AT hiveconn;
      
      INSERT INTO T (cd_department,lb_departement,cd_region,lb_region)
      SELECT 'a' as c1, 'b' as c2, 'c' as c3, 'd' as c4;"
      

      everything works fine !Running two select statements on each table using the same MAP OBJECT Statements works also fine.

      It seems that running INSERT INTO .... SELECT statement  using two tables from different connections failed.

      Somehow, the MAP OBJECT does not seem to use the correct connection to find the table in this case.

       

       

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            alarroque Arnaud Larroque

            Dates

              Created:
              Updated:

              Slack

                Issue deployment