[ZEPPELIN-2245] separate precode into JDBCInterpreter#2121
Conversation
felixcheung
left a comment
There was a problem hiding this comment.
can you clarify the goal of this in PR & JIRA description?
|
@felixcheung |
|
link to #2078 |
felixcheung
left a comment
There was a problem hiding this comment.
overall I think this is a good idea, one comment.
| <td>default.precode</td> | ||
| <td></td> | ||
| <td>Some SQL which executes while opening connection</td> | ||
| </tr> |
There was a problem hiding this comment.
could you add an example of using this?
perhaps in ## Binding JDBC interpter to notebook? Or another place you find
| %jdbc | ||
| show search_path | ||
| ``` | ||
| ```sql |
There was a problem hiding this comment.
I think you need an extra empty line after ```
| <th>Value</th> | ||
| </tr> | ||
| <tr> | ||
| <td>default.driver</td> |
There was a problem hiding this comment.
hmm, should it have/use default. here?
There was a problem hiding this comment.
maybe just omit them in this example?
There was a problem hiding this comment.
yes, here is set two data sources, each one with a precode
| ``` | ||
| ### Usage `precode` | ||
| You can set `precode` for each data source. Code runs once while opening the connection. | ||
|
|
There was a problem hiding this comment.
you might want to add a line here to say for example, first setup properties to mysql...
0f84c41 to
a136a0e
Compare
|
thanks, I see the changes, it would be good if you could add more descriptions on what they are doing |
|
@felixcheung |
|
To elaborate, this is what the documentation says |
|
@Leemoonsoo it looks like Jenkins is timing out again while Travis is actually passing (though taking a long time) |
|
merging if no more comment |
### What is this PR for? Separate precode by prefix. Added the ability to set different precode for different data sources ### What type of PR is it? Improvement ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-2245 ### How should this be tested? 1. Set properties ``` default.password 1 default.precode set search_path='test_path' default.url jdbc:postgresql://localhost:5432/ default.user postgres mysql.driver com.mysql.jdbc.Driver mysql.password 1 mysql.precode set v=12 mysql.url jdbc:mysql://localhost:3306/ mysql.user root ``` 2. Run `show search_path` 3. Run ``` %jdbc(mysql) select v ``` ### 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> Closes apache#2121 from tinkoff-dwh/ZEPPELIN-2245 and squashes the following commits: 970c064 [Tinkoff DWH] [ZEPPELIN-2245] editing documentation a136a0e [Tinkoff DWH] [ZEPPELIN-2245] documentation for usage of precode f896ea8 [Tinkoff DWH] [ZEPPELIN-2245] separate precode into JDBCInterpreter
### What is this PR for? Separate precode by prefix. Added the ability to set different precode for different data sources ### What type of PR is it? Improvement ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-2245 ### How should this be tested? 1. Set properties ``` default.password 1 default.precode set search_path='test_path' default.url jdbc:postgresql://localhost:5432/ default.user postgres mysql.driver com.mysql.jdbc.Driver mysql.password 1 mysql.precode set v=12 mysql.url jdbc:mysql://localhost:3306/ mysql.user root ``` 2. Run `show search_path` 3. Run ``` %jdbc(mysql) select v ``` ### 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> Closes apache#2121 from tinkoff-dwh/ZEPPELIN-2245 and squashes the following commits: 970c064 [Tinkoff DWH] [ZEPPELIN-2245] editing documentation a136a0e [Tinkoff DWH] [ZEPPELIN-2245] documentation for usage of precode f896ea8 [Tinkoff DWH] [ZEPPELIN-2245] separate precode into JDBCInterpreter
What is this PR for?
Separate precode by prefix. Added the ability to set different precode for different data sources
What type of PR is it?
Improvement
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-2245
How should this be tested?
show search_pathQuestions: