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

JDBC driver and beeline should support executing an initial SQL script

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0
    • Component/s: Clients, JDBC
    • Labels:
      None

      Description

      HiveCLI support the .hiverc script that is executed at the start of the session. This is helpful for things like registering UDFs, session specific configs etc.
      This functionality is missing for beeline and JDBC clients. It would be useful for JDBC driver to support an init script with SQL statements that's automatically executed after connection. The script path can be specified via JDBC connection URL. For example

      jdbc:hive2://localhost:10000/default;initScript=/home/user1/scripts/init.sql
      

      This can be added to Beeline's command line option like "-i /home/user1/scripts/init.sql"

      To help transition from HiveCLI to Beeline, we can keep the default init script as $HOME/.hiverc

        Attachments

        1. HIVE-5867.1.patch
          7 kB
          Jianguo Tian
        2. HIVE-5867.2.patch
          9 kB
          Jianguo Tian
        3. HIVE-5867.3 .patch
          9 kB
          Jianguo Tian

        Issue Links

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              JonnyR Jianguo Tian Assign to me
              Reporter:
              prasadm Prasad Suresh Mujumdar

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment