-
Notifications
You must be signed in to change notification settings - Fork 2.8k
JDBC generic interpreter #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jdbc/pom.xml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vgmartinez I think this dependency doesn't need any longer. Could you please remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vgmartinez I think this dependency doesn't need any longer. Could you please remove this?
|
@vgmartinez https://github.com/vgmartinez/incubator-zeppelin/blob/jdbc_interpreter/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java#L146 How about connecting without user or password? It's better use |
|
@vgmartinez Thanks for contribution on this issue which @Leemoonsoo and I talk about a few days ago. It will covers several Interpreters using JDBC. |
|
@vgmartinez Finally, How about adding a |
|
Hi @jongyoul, |
|
@felixcheung There are several implementations for jdbc. We should talk about it for focusing one issue. Do you have any idea? |
|
As @felixcheung mentioned, there were couple of attempt. What do you think? will rename postgresql to jdbc make some problem? |
|
If I recall there were 3 areas of discussions around JDBC:
|
|
|
How to get this function? |
|
@jiekechoo You can find a document on
|
|
@jongyoul I mean how to use jdbc interpreter. |
|
@jiekechoo This interpreter is based on jdbc connecttion, and this PR makes PostgreSqlInterpreter change JdbcInterpreter only. Thus you can use PostgrsSqlInterpreter to use Jdbc. @vgmartinez Could you please add docs for this interpreter? If you don't, I'll merge it first add docs later. |
|
Hi @jongyoul, |
|
@vgmartinez Sorry for delay. I've committed #455 #517 for supporting multiple instances - connections - Because that's based on this interpreter, it would be easy to fit those features in this interpreter. Could you please check those PRs? And I also hope you contribute the documentations. |
|
And could you please check https://www.mail-archive.com/[email protected]/msg05504.html at dev@. I, strongly, think every contribution should be tracked. |
|
FWIW - I vote for this implementation of JDBC Interpreter. I understand that your focus is on well-known databases - mysql, postgres etc. Please feel free to use my branch if you choose this implementation and give credit to @vgmartinez . He did all the hard work. |
|
@vrajat Thanks for taking an interest in this issue and being willing to contribute your code. I have a plan to merge several jdbc-like interpreters until 0.6.0-incubating. For that, I'm trying to find PRs related JDBC and contacting contributors to track their contribution. Now, I'm trying to contact the contributor of #211 and this PR is next candidate if I'm not contacting that contributor. And I also think this implementation looks the best, but I think the former contribution should be tracked and accepted at first if that contributor is still willing to give his/her time to contribute. I hope you understand my thoughts and plans. Finally, I will merge additional features of #455 and #517 into jdbc implementation. Please wait a moment and Thank you again for concerning about this issue. |
|
@vrajat And I also think JDBC interpreter supports all kind of JDBC drivers. |
|
I read your mail. I understand why you are following this process.
|
|
@vgmartinez Sorry for late reply. @Leemoonsoo Do you introduce or use the postgresql interpreter from master branch on the upcoming meetup at 21st Jan? If you do, I'll merge this PR after that. Unless you do, I'll merge it right now. |
|
@jongyoul Thanks for consideration. Please feel free to merge regardless of upcoming meetup. If i need, i can always use specific commit from git repository. |
|
@Leemoonsoo Thanks for the reply. I'll merge this PR after resolving conflict. |
|
@vgmartinez Hi, Could you please rebase this PR one more? Some logging codes are added by another PR. After that rebase, I'll merge it immediately. |
|
hi @jongyoul, |
|
@vgmartinez Thanks, I'll merge it. Did you make a PR for docs? or will you make it? |
|
@vgmartinez , @felixcheung , @asfgit, @Leemoonsoo IMHO This is unacceptable functionality degradation! I would propose to return the PostgreSQL interpreter until JDBC matures? I will try to prepare a hot-fix asap. |
|
Thanks for the quick response @vgmartinez , The SqlCompleter (removed by the last commit) is meant to be 100% JDBC API compliant and hopefully easy to reuse in a generic jdbc interpreter. IMO though it is unacceptable to remove a working interpreters until the JDBC interpreter is completed. Some Zeppelin users (like me) use the master to build Zeppelin and now suddenly some essential (for us) functionality is gone. I suggest returning the PSQL interpreter code ASAP. Let me know if you need help. In the meantime we can continue working on the generic JDBC. I will help porting the Completer functionality and missing tests. |
|
@tzolov Hi, your opinion makes sense. @Leemoonsoo also worried about changing Postgresql to Jdbc, but I don't think it's a big problem because I will add auto-completion feature before we release Zeppelin 0.6.0. But I agree that we should also consider those who use Zeppelin from master. I propose the way to support Postgresql and it's completer is to make another PR asap. But we should make sure that this is temporary until we completed JDBC interpreter. I'll restore Postgresql interpreter soon. And personally, sorry for confusing you. |
|
@vgmartinez Our goal is to move to the generic jdbc interpreter, finally. Could you please contribute a document? |
|
ok, no problem when I can add docs. @jongyoul you move the generic jdbc and restore the PostgresQL Interprete? |
|
@beeva-victorgarcia I keep this PR merged and add Postgresql interpreter again. I think this is more easier way to add Postgresql interpreter. |
|
ok...make sense |
|
@tzolov Oops. I've found what the problem is. I just delete sqlCompleter only. It's my mistake. I'll fix asap. |
|
Big applause to you guys! |
|
@jongyoul, |
|
Same principles that apply for extending/evolving APIs (or Interfaces) should apply here. One shouldn't drop a new incomplete and undocumented API while removing the existing one. |
|
@tzolov Yes, It would be safe in general case, but in this case, because we drop postgresql interpreter only, I think it's ok that I just add postgresql interpreter. What do you think of it? And I agree what you told is a general rule. |
### What is this PR for? Restore postgresql functionality and fix some mistake #361. ### What type of PR is it? Hot Fix ### Is there a relevant Jira issue? ZEPPELIN-614 ### How should this be tested? Outline the steps to test the PR here. ### 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: Jongyoul Lee <[email protected]> Closes #653 from jongyoul/hotfix/restore-psql and squashes the following commits: 8917ada [Jongyoul Lee] [HOTFIX] Temporary support on Postgresql - Related #361 fde5a2b [Jongyoul Lee] [HOTFIX] Temporary support on Postgresql - Related #361
|
I fixed my mistakes. Feel free to talk to me if there's some problems. Thanks everyone for taking care of it. |
|
In the next PR I add docs and auto-completion function...sorry for this confusion |
| connection = DriverManager.getConnection(url, user, password); | ||
| } else { | ||
| connection = DriverManager.getConnection(url, properties); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious about this if/else. Is there a specific issue this is working around? JDBC drivers interpret the user and password properties as the username and password for the connection, thus this condition seems unnecessary. What's more, it prevents passing of arbitrary additional properties along with the connection. Many JDBC drivers can be configured a great deal by adding vendor specific properties when the connection is created. This condition makes that impossible as long as a username and password are provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@whisperstream Hi, sorry for late reply. I agree with you and think it's my mistake and we have to fix that case that you told the above. Do you mind sharing your time to fix it?
Only you need to add to the classpath the jdbc connector jar and the interpreter add the particular properties for each db.
In the file zeppelin-daemon.sh add:
ZEPPELIN_CLASSPATH+=":${ZEPPELIN_HOME}/jdbc/jdbc/connector jar"