Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 297D8200B92 for ; Wed, 28 Sep 2016 09:42:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2805E160ADD; Wed, 28 Sep 2016 07:42:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6E35E160AB4 for ; Wed, 28 Sep 2016 09:42:21 +0200 (CEST) Received: (qmail 89124 invoked by uid 500); 28 Sep 2016 07:42:20 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 89109 invoked by uid 99); 28 Sep 2016 07:42:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Sep 2016 07:42:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8AA232C044E for ; Wed, 28 Sep 2016 07:42:20 +0000 (UTC) Date: Wed, 28 Sep 2016 07:42:20 +0000 (UTC) From: "Ferdinand Xu (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-5867) JDBC driver and beeline should support executing an initial SQL script MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 28 Sep 2016 07:42:22 -0000 [ https://issues.apache.org/jira/browse/HIVE-5867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15528746#comment-15528746 ] Ferdinand Xu commented on HIVE-5867: ------------------------------------ [~JonnyR], can you update the WIKI for this JIRA? > JDBC driver and beeline should support executing an initial SQL script > ---------------------------------------------------------------------- > > Key: HIVE-5867 > URL: https://issues.apache.org/jira/browse/HIVE-5867 > Project: Hive > Issue Type: Improvement > Components: Clients, JDBC > Reporter: Prasad Mujumdar > Assignee: Jianguo Tian > Labels: TODOC2.2 > Fix For: 2.2.0 > > Attachments: HIVE-5867.1.patch, HIVE-5867.2.patch, HIVE-5867.3 .patch > > > 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 > {noformat} > jdbc:hive2://localhost:10000/default;initScript=/home/user1/scripts/init.sql > {noformat} > 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 -- This message was sent by Atlassian JIRA (v6.3.4#6332)