Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render Map Without $__timeFilter? #307

Closed
ssnkhan opened this issue Mar 26, 2021 · 1 comment
Closed

Render Map Without $__timeFilter? #307

ssnkhan opened this issue Mar 26, 2021 · 1 comment

Comments

@ssnkhan
Copy link

ssnkhan commented Mar 26, 2021

Hi there,

I am trying to get the plugin to work using an underlying sqlite database. time (as below) is a unix epoch, and I am correctly setting the country codes and values to metric and value. Despite this, I am unable to get this to work, despite the Query editor returning the appropriate rows:

Grafana Query

The query I have so far is:

SELECT
    strftime('%s', created_at) AS time,
    country_code AS metric,
    count(*) AS value
FROM artifacts
WHERE strftime('%s', created_at) > 0
GROUP BY
    metric
ORDER BY
    value DESC;

Unfortunately, the sqlitedb plugin does not support $__timeFilter which is what I have used in the past with this map plugin without issue. I am happy to sacrifice the dynamic data selection (i.e., $__timeFilter(time)), if I can get the map to draw anything at all, but the moment I move the WHERE clause, I get a Data error: TypeError: this.datapoints is undefined error.

If anyone has any thoughts as to how to get this working, I'd really appreciate it.

@ssnkhan
Copy link
Author

ssnkhan commented Mar 26, 2021

Resolved -- time, metric and value fields are case sensitive.

@ssnkhan ssnkhan closed this as completed Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant