0

I have data that changes by the minute in regards to power plants. For instance, one of the things I have to determine is how much natural gas is going to be used over the course of the day to supply electricity to the grid.

Right now, I pull data from MS SQL, and manipulate the total net generation of the plant to figure out the amount of GJ's burned to produce that amount of power. This is one among many processes where I take MS SQL Data --> Manipulate Data Frames in Python --> Have final result and projection in a data frame

I would love to have this as a streaming table, but I'm unsure of how to do it with a service like grafana. How would I take the final data output from python and feed it to grafana? Would I need to input the results back into a database that Grafana can then pull? This information ideally shouldn't be on the internet, and just be a local server.

If it worked my final plan was to put it on a separate screen on my desk using something like a raspberry pi.

Cheers, and thanks in advance!

  • 1
    Yes you need to store your result somewhere compatible with Grafana. From docs it looks like Grafana can [integrate with MS SQL](https://grafana.com/docs/grafana/latest/datasources/mssql/) so you can put the data back there (in correct format) and then graph it. If your data manipulation is simple enough, you can just query directly from DB and no need for python. – Hitobat Jan 12 '22 at 20:46
  • Hi Hitobat - unfortunately the computations are not simple at all, and there are a ton of "if this, then that" scenarios that I don't think I could program in a SQL language (it took me 4 months to get it right in python). The results however, are very simple. I'm not a DB admin so adding stuff to the work database is a no go. If I uploaded the results into a free database service, would I be able to plug that in to grafana. Sorry if this seems like a very basic question. Still very new to all this. – Michael O'Connell Jan 12 '22 at 20:51
  • No probs, I thought it might be handy since MS SQL is one of the ["official" data sources](https://grafana.com/docs/grafana/latest/datasources/). However there's a [variety of plugins](https://grafana.com/grafana/plugins/?type=datasource) for this as well, including one to read from CSV files and another for Google Sheets. So maybe you can rewrite CSV file periodically from python, and have this displayed in Grafana. – Hitobat Jan 13 '22 at 09:48

0 Answers0