Fork me on GitHub
Cora (she/her)08:07:30

I just put together a little csv-to-yaml bb script and it was so nice to not have to install any libraries and have it work just perfectly

🎉 12

I see that clj-yaml now has a generate-stream function, but it's not mapped in bb yet. I'll add it.

Cora (she/her)08:07:59

I can't figure out a way to stream yaml out but this works well enough

Cora (she/her)08:07:24

I need to take off, it's incredibly late

Cora (she/her)16:07:20

does babashka have sqlite?


There are pods for every major type of database


H2 support would be nice in BB, even it was a custom build - it's the closest thing to sqlite in the JVM world I think


@lukaszkorecki There is a pod for hsqldb which is just about as close


will check it out!


Although, I found that being able to use CSV files directly from sqlite is most of the times enough for some data crunching, so my bb scripts usually just convert from some data format into CSV, and then all merging/processing happens in sqlite itself


a bit cumbersome, but works great for one-off or infrequent tasks


There is a feature flag for bb to include hsqldb if you need such a thing. Same for postgres.

👀 2

But the same can be accomplished using pods, with slightly more overhead in doing queries.


bb changes so fast, it easy way too easy to be out of the loop


The reason I haven't included any db solution so far is that there is too much to choose from: hsqldb, postgres, sqlite, datalevin, asami. Impossible to make everyone happy, this is why pods can be a more flexible approach without bloating bb with one solution.


The feature flags have been there for quite a while


Absolutely agree! Once you bundle one, there will be pressure to embed everything


yes, I had included the postgres one for maybe a week or so, but ended up reverting it for exactly this reason


although I love postgres, it didn't feel right considering the above


btw, the sqlite3 pod also shows how "easy" it is to implement a pod in golang, giving access to that ecosystem's libraries as well


I haven't tested the non-default feature flags in a long while, so it may need some polishing if you end up using it


Very handy, I'll take a look :thumbsup:


Adding more libs as optional feature flags is also welcome btw, if you end up using that within your company.


Right now the default build of bb works for us really well - we have monitoring daemons, rabbitmq queue management CLI and a couple of other things (config generators). Postgres support is something that I might be after, although pgmig already exists


Yep and the pod works really well. I've recently used it to migrate data from production to my local db


to debug a client problem


also honeysql works from source with bb, which makes it a really powerful combo