During an upgrade from 1.0.3+b2850 to 2.0.0+b2990
Ran the following commands… cd /opt/redash/current
sudo bin/upgrade
After the ugprade command ran, restarted both the supervisor and the entire server, and when it starts up, the configured data source no longer shows up in the list. Logging into pgsql directly, I can see the entry in the data_sources table, however it does not show up in the data sources. Rolling back to 1.0.3 by changing the symlink brings the data source back.
I did see this error in the supervisor log while trying to look into this…
[2017-08-14 15:02:03,073][PID:5490][ERROR][root] Error with DataSource#to_dict (data source id: 1)
Traceback (most recent call last):
File "/opt/redash/redash.2.0.0.b2990/redash/handlers/data_sources.py", line 80, in get
d = ds.to_dict()
File "/opt/redash/redash.2.0.0.b2990/redash/models.py", line 475, in to_dict
'syntax': self.query_runner.syntax,
AttributeError: 'NoneType' object has no attribute 'syntax'
We are actually using a Snowflake data source, and while I see the support for it in the code base, in the drop down of the data source types, it’s not listed. I think that might be why i’m getting the error above when it tries to add that data source. Anything special I’m supposed to do to get Snowflake to show up as a data source type in 2.0.0 when it was just working in 1.0.3??
And of course I found my own fix… Here’s the solution if anyone else comes across this…
Edit /opt/redash/current/redash/settings.py
Add the following line…
‘redash.query_runner.snowflake’
To the list of default query runners…
Query Runners
default_query_runners = [
The problem is the Snowflake query runner isn’t listed in the default list that comes in settings.py for 2.0.0, so I had to add it. Once I did, the data source showed up in the list. This is solved!
Changing settings.py is a bad practice, as it makes upgrades harder (it gets overriden). To add additional query runners, that aren’t enabled by default, just add to your environment variables the following:
I’m running version 3.0.0+b3134 on docker. Added the snowflake environment variable to the docker-compose.production.yml file and then restarted the containers. The variable seems to have persisted, but the connector still doesn’t show up in the drop-down list in the UI.
We no longer install Snowflake’s library by default is it collides with other dependencies we have. You need to update the Dockerfile/image to install it.
Could you please add an example in this thread of which would be the right way to set up a dockerfile from redash/redash?
Also, you mention some snowflake dependencies which collide with some others… Does it mean that some features may stop working if we want to use snowflake as a datasource?
Thank you for your answer!
Login or sign up disabled while the site is in read only mode