I’ve been having an awesome time playing with the direct postgres connection, but often times the bottleneck during visualization experimentation is pulling data. I’m thinking that I could iterate a lot faster if I streamed results from the database in small batches, so I could at least start taking a look at the visualization while it loads vs waiting ~10 seconds for it to finish…
but then I end up creating a new layer each time and throwing away the old ones… the right pattern isn’t coming to me. Anyone have a nice solution they could show?
If anyone comes up with a useful little set of these sort of Postgres helper functions, that are generic to the specific query you’re trying to run … I could see them being immensely popular as an importable helper notebook.
query`select * from users where username = ${userName}`
I ran it on MySQL so the syntax might be different for Postgres, but the idea is that it replaces the interpolations with placeholders so injection isn’t possible while maintaining the intuitiveness of concatenation.
This could also be expanded to the explain method. Would it make sense to incorporate this feature into the native API?