Is there a way to use redis as a datasource? I would like to build a report with values from redis.
You could write a query runner for it. Not sure what query language you’d use though. Query runner’s are pretty easy to write though. You just need to implement a few methods for running the query, fetching a schema, testing the connection etc.
Yeah, I was able to do via python runner.
Configure redis as whitelisted module for python runner and use following.
def columns():
return [
{
"name": "example",
"friendly_name": "Example",
"type": TYPE_INTEGER,
}
]
def fn():
import redis
r = redis.Redis(host='redis-slave', port=6379, db=0, password='password')
return {
"rows": [
{
"example": int(r.hget('key', 'field'))
},
],
"columns": columns()
}
result = fn()
Hi guys!
Sorry but I don’t understand how I can configure redis as datasource :\
@anirudh do you have any doc or example with how-to?
Regards,