Recommendations for Julia & SQL Workflow with Jupyter or VSCode

Earlier, I went to Neptune, then Pluto, and I was in the process of finding a kind of setup for Julia and SQL. So far, I’ve had some success, but I’m not there yet. I thought that maybe I went about it the wrong way. So I’m asking for an overview or something better of what I might look at.

So for someone who likes the most performance possible, who likes the most straightforward ways of getting things done, what might be a sweet setup that includes notebooks or whatever good equivalent, for the purposes of reporting/documenting. For now I don’t care that it has to be Jupyter, but it may be.

The choices I thought of are Neptune, or VSCode with Jupyter, or Juyter Lab.

Aside from that, for connetion between SQL and Julia, I thought of ODBC because it’s a general package that can connect to all the common SQL flavors. For the moment I’m also looking to use raw SQL handily in Julia.

Do you think this would be good, or do you have any better ideas or advice?

If you are only reading data from the DB, I would use Pluto.jl because it gives you the best interactivity and reproducibility.
If you also need to write data to the DB, working with Pluto’s reactivity gets a bit tricky.

As an alternative to write raw SQLs you can take a look at FunSQL.jl. I have not used it yet but it sounds very promising.

Thank you. I’ll take it into consideration.

I think I’ll give VSCode with Jupyter a try and see. What would be the best way to go about it? Do you need IJulia?

No, the idea of Notebook support in tbf VSCode extensionis to provide a kernel that does not require IJulia.

1 Like

Thank you!

As I’ve been thinking on it, I’ve come to two main options:

  • VSCode & extensions for Julia and SQL;
  • Jupyter Lab Desktop, Julia integration, and SQL integration.

What are the pros and cons of each of these two options?

If you think of plotting libraries, which are the most simple, most straightforward, and most efficient to use with those two options above, also considering which has the prettiest standard settings?

I have a pretty similar workflow and have tried jupyter, Pluto, and vscode. At the end of the day they are all good. I mostly use vscode as it has the most features. I really like Pluto too for the built in package manager and reactivity but it’s a bit sparse (e.g. no file manager) so I don’t always use it. I use jupyter when I’m connected to remote systems mostly (we have a jupyterhub on a Server at work). I like that I can use it with Julia, python and R and it’s the same interface (python is fine in vscode but R is not as good). As for plotting I have had fewer problems with vscode than jupyter when plotting interactively.

Thanks for the comment. I wanted to use Neptune at first, but somehow it doesn’t load in the browser. There doesn’t seem to be any solution.

I tried VSCode, but sort of got pissed off a little. I’m one of those who likes software to be as efficient as possible. :sweat_smile: I don’t like how it has high RAM usage.

So for now that leaves Jupyter Lab Desktop, but I don’t really hope for that either. It’s also made with Electron, right?

So that might leave Sublime with basic Jupyter support. Would someone please comment on that?

[…] what might be a sweet setup that includes notebooks […] I tried VSCode […] I don’t like how it has high RAM usage.

There is sweet and cool Erudite VIM [Erudite Vim - Sensational Vim Configuration] and on a dark side there is LunarVIM [Vim for Julia — Another Look. LunarVim as a Julia IDE | by DSB | Coffee in a Klein Bottle | Medium]. It should be possible to configure both with notebooks (never tried). There is also Juno / Atom / Hydrogen which is really interesting configuration but “not fully supported” anymore (even though I guess its still working perfectly). I think that you may also consider “The Qt Console for Jupyter” [The Qt Console for Jupyter — Jupyter Qt Console 5.4.3 documentation] which should provide fairly light configuration of this type (also never tried). One thing to add to @nilshg comment about native VSCode Jupyter notebook support. The last time I was reading about it (a few weeks ago), if I am recalling correctly, it was limited to one CPU core (tbc). So if there was no change since them, IJulia kernel might provide better performance.

1 Like

Multithreaded kernels have just been added, so should be available soon

Thanks for the comments, @j_u and @nilshg.

@j_u, Atom and that kind of business is heavy, right? I do remember Atom having an annoying in-your-face installation process that can’t be easily uninstalled unless you go through many paths to remove things manually. It’s a no-go.

Vim or Neovim I like, but I only use it as a raw text editor. I had trouble installing plugins before, even if was supposed to be straightforward. I’m using a Windows machine for these things, and it just went wrong. Last time I checked, which was not that long ago, there was no serious support or directions, because many are biased towards Linux (I like Linux too, but I’m using a Windows machine now).

I think that Qt Console is my best bet for now, but I fear it’s gonna be trouble and frustration to set up. But even if I get it to work, what are the consequences for plotting libraries? It says,

One of the most exciting features of the Qt Console is embedded figures. You can plot with matplotlib in IPython, or the plotting library of choice in your kernel.

But even if that’s true, I imagine there’s probably compromises. For example, what about interactivity?

@nilshg, when I tried VSCode, I saw their docs and they mentioned you had to use the usual kernel (IJulia). Maybe I missed something, but only when I installed IJulia I could have a Julia notebook session.

Thinking about all this, I tend to just go for some sort of “primitive” setup for documenting steps/results, instead of using Jupyter and all this business of losing time. If I’d just use some Office program where I paste graphs and write text, at least I’d get results already :smiling_face_with_tear:

Don’t forget about FloatingTableView.jl. It will let you view large datasets similar to built-in stuff in VS Code, but you can just work from the terminal.

1 Like

Atom and that kind of business is heavy, right?

Its subjective and I belive IDE choice is a personal thing.

Vim or Neovim I like, but I only use it as a raw text editor. I had trouble installing plugins before, even if was supposed to be straightforward.

I suggest you check by yourself. Its fairly easy. Erudite is fully configured for Julia however might need some dependencies like npm and rust which is not quite the case with Lunar. Both are really good and I hope Erudite will be developed further.

I think that Qt Console is my best bet for now, but I fear it’s gonna be trouble and frustration to set up. But even if I get it to work, what are the consequences for plotting libraries?

As I wrote, I do not have direct experience with it.

To sum up, from my point of view VS Code is the easiest and most documented currently. I miss a bit Juno/Hydrogen. There are many other editors (i.e. Onivim2 or JetBrains DataSpell). Happy coding.