Using postgreSQL database as datasource

Hi all,
does anybody know if their is any guidline for using a database like postgreSQL as a source for holoviews? I took a look at this https://holoviews.org/user_guide/Tabular_Datasets.html basic document but beside this I didn’t find anything.
Does anyone has experiences in this field and is willing to share these?

There is no plug and play for sql database. I already thought that it could be a good idea to autogenerate a dashboard by exploring a database structure.

You can check the second part of my article, it’s dealing with plotting data from a postgresql database with holoviews IoT measurements data

1 Like

I like to use pd.read_sql() and then holoviews/hvplot immediately can support it.

If you are only reading then Pandas’ built in is probably the easiest approach as @ahuang11 suggested.

If you want to insert/write/etc as well then https://www.psycopg.org/ is an option.

If, you’re at the stage of considering options for a Panel front end + database, then I strongly recommend you to explore https://anvil.works/. Their built-in Data Tables and also their Anvil-Uplink solutions combined with Panel apps are absolutely amazing.

The latency you can achieve with a Anvil + Panel + Heroku for free is crazy…

Hi @danmaty

Do you have a link to a example combining Anvil+Panel? I would like to learn how they can be combined and experience the low latency mentioned. Thanks.

HoloViews has an as-yet-minimally-documented SQL backend via Ibis nowadays: https://github.com/holoviz/holoviews/pull/4517

1 Like

Thanks @jbednar .

Is there any example or docs that can be found? Where?

@philippjfr 's last comment on that PR was “I’m merging now and hoping that we can get some docs in before release”, but I don’t recall docs or examples ever appearing. @philippjfr?