Skip to content

[ZEPPELIN-2679] JDBC. precode for session#2920

Closed
mebelousov wants to merge 12 commits into
apache:masterfrom
Tinkoff:ZEPPELIN-2679
Closed

[ZEPPELIN-2679] JDBC. precode for session#2920
mebelousov wants to merge 12 commits into
apache:masterfrom
Tinkoff:ZEPPELIN-2679

Conversation

@mebelousov
Copy link
Copy Markdown
Contributor

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)

  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

@mebelousov
Copy link
Copy Markdown
Contributor Author

@zjffdu
Another repo and another PR, but the same error
https://travis-ci.org/TinkoffCreditSystems/zeppelin/builds/365002216

r-kamath and others added 2 commits April 15, 2018 20:59
### 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)
@asfgit asfgit closed this in edf3c25 Apr 16, 2018
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
@Savalek Savalek deleted the ZEPPELIN-2679 branch July 5, 2019 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants