GitHub user tinkoff-dwh opened a pull request:

    https://github.com/apache/zeppelin/pull/2442

    [ZEPPELIN-2679] JDBC. precode for session

    ### What is this PR for?
    We have a precode for interpreter (all interpreters) which executes once 
after start interpreter. With it we can create shared code that will be 
available in the paragraph, create tables in the database and etc. This precode 
for jdbc only which executes before run paragraph in same session (sql). In 
this precode we can declare session variables that will be available when you 
run paragraph (any sql which will be executed before the paragraph). For 
exabple `set search_path='public,#{user}'`
    
    ### What type of PR is it?
    Feature
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-2679
    
    ### How should this be tested?
    (jdbc interpreter, postgres)
    1. set property **default.sessionPrecode** `set 
search_path='test_session_precode'`
    2. run paragraph `show search_path`
    
    ### Questions:
    * Does the licenses files need update? no
    * Is there breaking changes for older versions? no
    * Does this needs documentation? no


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tinkoff-dwh/zeppelin ZEPPELIN-2679

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/2442.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2442
    
----
commit bd3d80952ca56e709379632318ba1193a17338ae
Author: Tinkoff DWH <tinkoff....@gmail.com>
Date:   2017-06-23T11:58:20Z

    [ZEPPELIN-2679] jdbc. precode for session

commit ae7a0d63966a1ddbf89292715221d041ecdc2b74
Author: Tinkoff DWH <tinkoff....@gmail.com>
Date:   2017-06-26T04:14:11Z

    [ZEPPELIN-2679] tests

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to