1

I have already edited the .env file and added the export REDASH_ADDITIONAL_QUERY_RUNNERS=redash.query_runner.python into it

I have python as a datasource now. But I'm not sure how to write python code to be executed under a query after selecting the python as the datasource.

https://gist.github.com/arikfr/be7c2888520c44cf4f0f#file-query-py-L11

I've been following that example to structure my code. But I can't even get a simple script to run because I'm getting this error

Error running query: 'NoneType' object has no attribute 'annotate_query'

Niraj Fonseka
  • 41
  • 2
  • 5

1 Answers1

1

Judging by the error message, it looks like the Celery worker didn't load the Python query runner.

To restart the workers just run: $ supervisorctl restart all

arikfr
  • 3,311
  • 1
  • 25
  • 28