Create a State Timeline chart from MariaDB data with Starting and Ending Times

  • What Grafana version and what operating system are you using?
    Grafana 10.4.1 running locally on a Linux computer

  • What are you trying to achieve?
    I am trying to query a MariaDB table of weather events for four counties and “graph” that into a State Timeline chart with each county on a line, and the events color-coded by what type of weather event they were. The source table contains two time fields: the starting time for the event and the ending time for the event. I am looking for an output table along the lines of this:

  • How are you trying to achieve it?
    My source data looks like this:

    I am starting with the following SQL query:
    SELECT Event_UUID, Phenomenon, Significance, County, EffectiveTime, EndTime FROM SCADA_Automation.`Weather_Events.0000`

    However, I cannot figure out how to get all of this into a single data series with the attributes that I need and the correct “On” and “Off” times.

  • What happened?
    I got this, which is decided not what I was after:

  • What did you expect to happen?
    I wasn’t sure what to expect, but I wanted this:

  • Can you copy/paste the configuration(s) that you are having problems with?
    I really am not getting far enough with this to be “having problems” with any specific configurations. I just can’t get it to work at all.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    I did not get any errors…I just didn’t get anything useful, either.

  • Did you follow any online instructions? If so, what is the URL?
    No. I couldn’t really find any instructions for what I am trying to do.