Dashboard variables with Grafana datasource

Greetings,

I am using Grafana live to visualize data gathered from a script and pushed to the former’s datasource.
When it comes down to dashboards variables, I usually query a database, but I now need a value in the live measurements.

How do I query the Grafana Datasource in the dashboard’s variables menu?
I tried to find anything online but all variables I found were using different datasources.

Thanks in advance.