[ZEPPELIN-2679] JDBC. precode for session#2920
Closed
mebelousov wants to merge 12 commits into
Closed
Conversation
# Conflicts: # jdbc/src/test/java/org/apache/zeppelin/jdbc/JDBCInterpreterTest.java
# Conflicts: # jdbc/src/test/java/org/apache/zeppelin/jdbc/JDBCInterpreterTest.java
Contributor
Author
|
@zjffdu |
### What is this PR for? Travis build failure due to npm error e.g: https://travis-ci.org/TinkoffCreditSystems/zeppelin/jobs/365002217 ### What type of PR is it? Bug Fix ### Todos * [ ] - Task ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-3406 ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: Renjith Kamath <rkamath@apache.org> Closes apache#2928 from r-kamath/ZEPPELIN-3406 and squashes the following commits: 14ca6be [Renjith Kamath] ZEPPELIN-3406 Travis build failure due to npm error (cherry picked from commit 7aa94ce)
This reverts commit 11cbc44
asfgit
pushed a commit
that referenced
this pull request
Apr 16, 2018
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 example `set application_name='#{user};`
Previous discussion in #2442
Feature
https://issues.apache.org/jira/browse/ZEPPELIN-2679
(jdbc interpreter, postgres)
1. set property **default.statementPrecode** `set application_name='#{user}';`
2. run paragraph `select current_setting('application_name');`
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: tinkoff-dwh <tinkoff.dwh@gmail.com>
Author: mebelousov <mebelousov@ya.ru>
Author: Tinkoff DWH <tinkoff.dwh@gmail.com>
Author: Renjith Kamath <rkamath@apache.org>
Author: isys.mreshetov <m.reshetov@i-sys.ru>
Closes #2920 from mebelousov/ZEPPELIN-2679 and squashes the following commits:
d610805 [mebelousov] Revert "ZEPPELIN-3406 Travis build failure due to npm error"
11cbc44 [Renjith Kamath] ZEPPELIN-3406 Travis build failure due to npm error
11f89a5 [mebelousov] ZEPPELIN-2679 Small fix in docs
e9d36d2 [mebelousov] Merge remote-tracking branch 'apache/master' into ZEPPELIN-2679
00aeabf [tinkoff-dwh] ZEPPELIN-2679 fix checkstyle
f7529ca [tinkoff-dwh] Merge remote-tracking branch 'upstream/master' into ZEPPELIN-2679
07b41c5 [tinkoff-dwh] ZEPPELIN-2679 rename test methods
cd0d6ed [tinkoff-dwh] Merge remote-tracking branch 'upstream/master' into ZEPPELIN-2679
7bba0db [tinkoff-dwh] ZEPPELIN-2679 rename session to statement
719d0a2 [isys.mreshetov] ZEPPELIN-2679 docs
ae7a0d6 [Tinkoff DWH] [ZEPPELIN-2679] tests
bd3d809 [Tinkoff DWH] [ZEPPELIN-2679] jdbc. precode for session
(cherry picked from commit edf3c25)
Signed-off-by: Jeff Zhang <zjffdu@apache.org>
jwagun
pushed a commit
to jwagun/zeppelin
that referenced
this pull request
Apr 23, 2018
### 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 example `set application_name='#{user};`
Previous discussion in apache#2442
### 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.statementPrecode** `set application_name='#{user}';`
2. run paragraph `select current_setting('application_name');`
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: tinkoff-dwh <tinkoff.dwh@gmail.com>
Author: mebelousov <mebelousov@ya.ru>
Author: Tinkoff DWH <tinkoff.dwh@gmail.com>
Author: Renjith Kamath <rkamath@apache.org>
Author: isys.mreshetov <m.reshetov@i-sys.ru>
Closes apache#2920 from mebelousov/ZEPPELIN-2679 and squashes the following commits:
d610805 [mebelousov] Revert "ZEPPELIN-3406 Travis build failure due to npm error"
11cbc44 [Renjith Kamath] ZEPPELIN-3406 Travis build failure due to npm error
11f89a5 [mebelousov] ZEPPELIN-2679 Small fix in docs
e9d36d2 [mebelousov] Merge remote-tracking branch 'apache/master' into ZEPPELIN-2679
00aeabf [tinkoff-dwh] ZEPPELIN-2679 fix checkstyle
f7529ca [tinkoff-dwh] Merge remote-tracking branch 'upstream/master' into ZEPPELIN-2679
07b41c5 [tinkoff-dwh] ZEPPELIN-2679 rename test methods
cd0d6ed [tinkoff-dwh] Merge remote-tracking branch 'upstream/master' into ZEPPELIN-2679
7bba0db [tinkoff-dwh] ZEPPELIN-2679 rename session to statement
719d0a2 [isys.mreshetov] ZEPPELIN-2679 docs
ae7a0d6 [Tinkoff DWH] [ZEPPELIN-2679] tests
bd3d809 [Tinkoff DWH] [ZEPPELIN-2679] jdbc. precode for session
prabhjyotsingh
pushed a commit
to prabhjyotsingh/zeppelin
that referenced
this pull request
Jul 4, 2018
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 example `set application_name='#{user};`
Previous discussion in apache#2442
Feature
https://issues.apache.org/jira/browse/ZEPPELIN-2679
(jdbc interpreter, postgres)
1. set property **default.statementPrecode** `set application_name='#{user}';`
2. run paragraph `select current_setting('application_name');`
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: tinkoff-dwh <tinkoff.dwh@gmail.com>
Author: mebelousov <mebelousov@ya.ru>
Author: Tinkoff DWH <tinkoff.dwh@gmail.com>
Author: Renjith Kamath <rkamath@apache.org>
Author: isys.mreshetov <m.reshetov@i-sys.ru>
Closes apache#2920 from mebelousov/ZEPPELIN-2679 and squashes the following commits:
d610805 [mebelousov] Revert "ZEPPELIN-3406 Travis build failure due to npm error"
11cbc44 [Renjith Kamath] ZEPPELIN-3406 Travis build failure due to npm error
11f89a5 [mebelousov] ZEPPELIN-2679 Small fix in docs
e9d36d2 [mebelousov] Merge remote-tracking branch 'apache/master' into ZEPPELIN-2679
00aeabf [tinkoff-dwh] ZEPPELIN-2679 fix checkstyle
f7529ca [tinkoff-dwh] Merge remote-tracking branch 'upstream/master' into ZEPPELIN-2679
07b41c5 [tinkoff-dwh] ZEPPELIN-2679 rename test methods
cd0d6ed [tinkoff-dwh] Merge remote-tracking branch 'upstream/master' into ZEPPELIN-2679
7bba0db [tinkoff-dwh] ZEPPELIN-2679 rename session to statement
719d0a2 [isys.mreshetov] ZEPPELIN-2679 docs
ae7a0d6 [Tinkoff DWH] [ZEPPELIN-2679] tests
bd3d809 [Tinkoff DWH] [ZEPPELIN-2679] jdbc. precode for session
(cherry picked from commit edf3c25)
Signed-off-by: Jeff Zhang <zjffdu@apache.org>
(cherry picked from commit 1795ed4)
Change-Id: If10f5f7f87628931e5528999bc72d7874efe9a78
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 example
set application_name='#{user};Previous discussion in #2442
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)
set application_name='#{user}';select current_setting('application_name');Questions: