Skip to content

Conversation

@vgmartinez
Copy link
Contributor

What is this PR for?

Docs for jdbc interpreter

What type of PR is it?

Documentation

Todos

Is there a relevant Jira issue?

No. But there is related PR: https://issues.apache.org/jira/browse/ZEPPELIN-614

How should this be tested?

Screenshots (if appropriate)

Questions:

Does the licenses files need update? No
Is there breaking changes for older versions? No
Does this needs documentation? No

@vgmartinez
Copy link
Contributor Author

@jongyoul please review and feel free to comment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we add this as a code block so that an user can copy/paste it?

@vgmartinez
Copy link
Contributor Author

thanks @felixcheung....It is much better now

@felixcheung
Copy link
Member

thx, you might have forgotten to take out images replaced with text from this PR?

@vgmartinez
Copy link
Contributor Author

I'm sorry....;)

@felixcheung
Copy link
Member

@vgmartinez thanks, but to clarify, I think it's fine that you have images to show results along with the code that can be pasted.

As of now though, you have image files such as jdbc-interpreter-use.png in this PR, but they are not referenced in jdbc.md? I'd suggest removing these from this commit/PR:

docs/assets/themes/zeppelin/img/docs-img/jdbc-interpreter-multiple-jars.png
docs/assets/themes/zeppelin/img/docs-img/jdbc-interpreter-multiple-settings.png
docs/assets/themes/zeppelin/img/docs-img/jdbc-interpreter-simple-jar.png
docs/assets/themes/zeppelin/img/docs-img/jdbc-interpreter-simple-setting.png
docs/assets/themes/zeppelin/img/docs-img/jdbc-interpreter-use.png

@vgmartinez
Copy link
Contributor Author

ok...it ready now...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh sorry, I've missed this - please update the text as shown in the image since there is no image now?

@felixcheung
Copy link
Member

pending some text issues, assuming these are fixed, this looks good.
merging if there is no more discussion, thanks.

@vgmartinez
Copy link
Contributor Author

Done

@AhyoungRyu
Copy link
Contributor

Hi @vgmartinez, thank you for a new JDBC interpreter and the docs! : )
If you want to add a docs for new interpreter, you have to provide a link for it.
Please add <li><a href="{{BASE_PATH}}/interpreter/jdbc.html">JDBC</a></li> below this line.

@vgmartinez
Copy link
Contributor Author

Hi @AhyoungRyu....It done
thank for review...

@Leemoonsoo
Copy link
Member

Thanks @vgmartinez for the documentation.
LGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that part really similar to the previous configurations tables?

@corneadoug
Copy link
Contributor

One question about that interpreter, how do you specify the database you want to use?

@felixcheung
Copy link
Member

It depends on the type, but database name is normally part of the jdbc url: https://www.petefreitag.com/articles/jdbc_urls/

maybe we should show some example in the doc.

@corneadoug
Copy link
Contributor

Yes it would be better to have it documented then.
So, that means you need to create a different interpreter configuration for each database you want to query.
Could we use multiple interpreter configuration in the same notebook?

@vgmartinez
Copy link
Contributor Author

Hi @corneadoug,
Yes, you need create a diferent configurations for each db you use....and you can use multiple configuration in the same notebook this way:
image

@corneadoug
Copy link
Contributor

@vgmartinez where is postgres coming from inside jdbc(postgres)?
Is it the name used to create the interpreter in the interpreter tab?

@vgmartinez
Copy link
Contributor Author

To create the configuration is like this:
image

its similar to create a profile o env....

@corneadoug
Copy link
Contributor

To me there is still plenty of things missing in the doc:

  • Database part is not mentioned anywhere (it seems it is part of the url)
  • The connections are grouped by environments where everyone can be the same type or different So you could have multiple postgres configurations? And choose which one to use (which DB)
  • specify the parameters for grouped environments How do you know the group environment name?
  • The most common properties are as follows So there might be more? Where could you see the others? Would they be listed by default?
  • If you want to use other connection you should specify the name of it where do you find those names?

@vgmartinez
Copy link
Contributor Author

now I'm busy at work in 1 to 2 days to complete it....thanks for review

@corneadoug
Copy link
Contributor

No problem

@vgmartinez
Copy link
Contributor Author

@felixcheung @corneadoug ready to review...I think it is ready...

@corneadoug
Copy link
Contributor

@vgmartinez I liked the improvements, that was easy to read and self-explanatory.

Just a couple of questions about the JDBC interpreter:

  • Is it possible to connect to 2 different databases in the same interpreter? (MySQL Server1/DB1 and MySQL Server1/DB2)
  • How is the prefix defined?

change bad name in property
@vgmartinez
Copy link
Contributor Author

Hi @corneadoug,

  • yes, you can.
    name value
    common.max_count 1000
    prefix1.driver org.mysql.Driver
    prefix1.password `********`
    prefix1.url server1:port/db1
    prefix1.user user
    prefix2.driver org.mysql.Driver
    prefix2.password `********`
    prefix2.url server1:port/db2
    prefix2.user user
  • you define the prefix with any name, and to use is %jdbc(prefix1) or %jdbc(prefix2)

@corneadoug
Copy link
Contributor

Awesome! I think its good, waiting for @felixcheung in case he sees something to change

<li><a href="{{BASE_PATH}}/interpreter/geode.html">Geode</a></li>
<li><a href="{{BASE_PATH}}/interpreter/hbase.html">HBase</a></li>
<li><a href="{{BASE_PATH}}/interpreter/hive.html">Hive</a></li>
<li><a href="{{BASE_PATH}}/interpreter/jdbc.html">JDBC</a></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might want to move this down a line after "Ignite"? (since this is sorted)

@felixcheung
Copy link
Member

couple of questions, thanks for adding more details

@vgmartinez
Copy link
Contributor Author

I fixed @felixcheung...

</tr>
<tr>
<td>default.password</td>
<td>`********`</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @vgmartinez. Thank you for your effort to JDBC docs : )

If you purposed a code block for ********, you have to use <code> tag in the table tag instead of the back quatation mark . Or, it doesn't work.

@felixcheung
Copy link
Member

Thanks, please fix and we should merge this unless anyone has more comment.

@vgmartinez
Copy link
Contributor Author

It's fixed @felixcheung

@felixcheung
Copy link
Member

Thanks could you see this comment #661 (comment)
and this comment #661 (comment)
too?

@vgmartinez
Copy link
Contributor Author

@felixcheung @AhyoungRyu
sorry had not see those comments ... I'm a little distracted....

@felixcheung
Copy link
Member

@vgmartinez sorry, i think my comment has confused you.
Please change this line
to
It is not necessary to add driver jar to the classpath for PostgreSQL as it is included in Zeppelin.

@vgmartinez
Copy link
Contributor Author

Fix

@felixcheung
Copy link
Member

thanks, merging if no more discussion.

@jongyoul
Copy link
Member

jongyoul commented Feb 9, 2016

LGTM

@AhyoungRyu
Copy link
Contributor

LGTM : )

@asfgit asfgit closed this in 1bdf1ff Feb 10, 2016
prabhjyotsingh pushed a commit to prabhjyotsingh/zeppelin that referenced this pull request Feb 10, 2016
Docs for jdbc interpreter

Documentation

No. But there is related PR: https://issues.apache.org/jira/browse/ZEPPELIN-614

Does the licenses files need update? No
Is there breaking changes for older versions? No
Does this needs documentation? No

Author: Victor Manuel <viktor.manuel.garcia@gmail.com>
Author: vgmartinez <viktor.manuel.garcia@gmail.com>

Closes apache#661 from vgmartinez/generic_jdbc_docs and squashes the following commits:

f9cf476 [Victor Manuel] Fix comment
cee96a6 [Victor Manuel] fix docs and add  more details
cd60020 [Victor Manuel] delete parentheses...
d92d7d8 [Victor Manuel] add default prefix in simple connection
b973022 [Victor Manuel] change order in link
f9f194e [Victor Manuel] Update jdbc.md
e3653ba [vgmartinez] fix dead link
38ccefb [vgmartinez] docs for jdbc
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.

6 participants