Time field restrictions in data source

Running into a couple of issues with the validation of the time field. First, it rejects any fields that begin with an underscore? I don’t see the motivation for that in the commit history. Are the devs open to the idea of relaxing that restriction?

Second, I’d like the time field to be optional. Current need is to support using the data source for template variables. It would also be useful for table panels that you don’t want tied to the dashboard’s time selection. I’ve hacked my local copy to support my template variable needs. Before polishing it and submitting a PR, I wanted to ping the devs about their receptiveness to such a change. Or, perhaps there is a better approach?

Relevant issue: https://github.com/grafana/grafana/issues/4583

Hi,

Which version of Grafana are you using? Have you tried the latest version of Grafana?

The file of the commit you are referring to does no longer exist in master. I think the equivalent file is this one, but I cannot find any references that blocks use of fields starting with underscore.

Regarding optional time fields and your referenced issue I can see that you’ve got that answered.

Marcus