-
Notifications
You must be signed in to change notification settings - Fork 448
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
Executing cell in specific language #598
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Léopold Mebazaa <lemeb@users.noreply.github.com>
Signed-off-by: Léopold Mebazaa <lemeb@users.noreply.github.com>
Signed-off-by: Léopold Mebazaa <lemeb@users.noreply.github.com>
Signed-off-by: Léopold Mebazaa <lemeb@users.noreply.github.com>
Signed-off-by: Léopold Mebazaa <lemeb@users.noreply.github.com>
Signed-off-by: Léopold Mebazaa <lemeb@users.noreply.github.com>
This reverts commit 6a63f65.
This is pretty cool. Thank you! To get this merged, we'd probably need:
Not really sure if it's possible to do syntax highlighting per cell... |
thanks @itamarst! I'll try to have these two tasks done in the next few weeks when my thesis is done. :) (Right now, I'd had to boot sparkmagic out of my computers because it wasn't playing well with anaconda.) Keep up the good work! |
Hi @lemeb, this is great! |
except BadUserConfigurationException as e: | ||
codekind = session.kind |
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.
Why do we need to default this to the session kind? A statement without any kind attribute will use the session kind by default. Reference: https://livy.incubator.apache.org/docs/latest/rest-api.html#session-kind
hi @devstein ! Is there still a need for this PR? I could work on finishing it if you want. Best :) |
This feature was implemented also in #892 (independently) on the latest master branch. |
As mentioned in #509, #507, and #450, it is now possible in Livy to execute Spark code in Python, Scala, R for any Livy session. That would be great if you want to write polyglot notebooks and, as it turns out, it is quite a low-hanging fruit.
A few notes:
%%spark run -l [language]
for IPython kernels, or%%spark -l [language]
for Sparkmagic kernels.Here is a (slightly doctored for the sake of simplicity) working example. The json file is from here.
That was simple enough; now, for further, hard questions:
Anyway, thanks for all your hard work! Peace ✌️