Database Storage and External Access

I am currently storing my HA Data in a MariaDB external to HA. What I am planning on doing is write my Grafana Dashboard to query directly into the HA MariaDB Database. To do this, I want to create SQL Functions/Procedures in the HA Database.

From an HA point of view (architecture / upgrades / etc.) is this safe to do?

I have in the past used InfluxDB, but I want to move off that, hence the use of MariaDB and direct Grafana → HA queries.

Is there a better approach I should be following - for example export specific sensors to a different MariaDB Host using a similar push method used for InfluxDB ?

All thoughts appreciated before I go down this rabbit hole.

Okay I have climbed out of that Rabbit hole and decided not to go there again. I have reverted to InfluxDB V1.11 as I want to use SQL (or SQL-like) in V1.11’s case.

What I really need is to move to InfluxDB V3 for the SQL queries, but I am not sure I can currently push sensors into V3 - can I? Anyone know?