Issue Summary

When trying to add new connection, Snowflake is not available.

Technical details:

I am running redash via the Published docker image for v8, in the previous version (v7) Snowflake was available by default.

  • Redash Version: 8.0.0
  • Browser/OS: Chrome/Mac
  • How did you install Redash: Redash is running on Kubernetes using the official redash docker image redash/redash:8.0.1.b33387

Snowflake has never been enabled by default. Looking at step 21 of the image you’ll need to update this instruction to include requirements_all_ds.txt.

We enabled it in v7 or v8…

It might be a dependencies issue. We will check and create a new image if needed.

I looked through some of the version tags in GH but I don’t see the Snowflake connector included in requirements.txt or requirements_dev.txt. Only in requirements_all_ds.txt. I’m sure I’m missing something…

@arihantsurana forgot to mention: until we release a fixed image, you can use the 8.0 image. There is no difference between them that will be significant for you.

We install the requirements_all_ds.txt file when building the image.

Do you have an update on this? I’m new to Redash but would like to help if possible or at least get familiar with it.

See Arik’s response here:

forgot to mention: until we release a fixed image, you can use the 8.0 image. There is no difference between them that will be significant for you.

Thanks @arikfr I have deployed the image tagged 8.0.0.b32245 and it seems to work. I will look out for the updated image and roll forward, hopefully soon.

Just a heads up - it seems like the most recent pinned Docker image (redash/redash:8.0.1.b33387) is on snowflake_connector_python==1.8.6 and still has this issue, so I had to upgrade to snowflake-connector-python==2.0.3.

1 Like

When I try to test my snowflake connection; it tells me no Object found.
I can connect to snowflake using python and credentials are fine.
I’m on this version: [8.0.0.b32245]

any help?

Getting this error when trying to run a query vs the Snowflake db that is connected. I have running version [8.0.0.b32245]. I had to update the following packages to enable snowflake

SQLAlchemy==1.3.22
snowflake_connector_python==2.1.3

When trying to run a query as simple as “SELECT 1” I get the following error.
’NoneType’ object has no attribute 'annotate_query’

Thoughts on what is causing this?

@arikfr What is needed to be done to enable Snowflake to run on the verified v8 version of redash. To enable Snowflake as a data source I had to update the packages

snowflake_connector_python==2.1.3 and SQLAlchemy==1.3.22

from the original

snowflake_connector_python==1.8.6 and SQLAlchemy==1.2.12

This allowed Snowflake to appear as data source and I was able to connect successfully.

However when attempting to run a query vs Snowflake an error was thrown, ’NoneType’ object has no attribute 'annotate_query’. I found that this was happening within redash/tasks/queries.py within the Class QueryTask

This function:
def to_dict(self):
task_info = self._async_result._get_task_meta()
result, task_status = task_info[‘result’], task_info[‘status’]

Where the result comes in as None therefore throwing an error when trying to run the annotate_query function vs the result. Is this a possible side effect of the package upgrade I had to do to enable Snowflake as a datasource?

Have you gotten Snowflake enabled as a Datasource on v8 of redash and been able to run queries against it successfully? Any insight here would be appreciated. Thank you.

It sounds like you need to downgrade your version of pip. The recent versions of pip won’t allow version conflicts and the repo has not been updated to reflect this.

FYI: there’s no need to ping specific users on the forum for updates on this.

Understood I will not ping users here, apologies for that.

However I’m not sure downgrading pip will resolve my issue. I am running the version of pip that comes with the redash v8 version, which is pip-19.2.2. Snowflake with the default packages setup in the tagged redash v8 version is not accessible as a data source. You need to update the the snowflake_connector_python above the 2.0.0 version, when doing that you also need to update SQLAlchemy above 1.3.0. This allows connection to work but queries fail to run.

Are you suggestion I should downgrade pip further than 19.2.2? And that would somehow resolve this issue regarding the error ’NoneType’ object has no attribute 'annotate_query’ when running a query vs Snowflake?

This issue occurs when running a query vs the Snowflake data source appears to be related to the celery package. Which I see was removed within the v9 beta version of redash.

I was able to get Snowflake queries working within the tagged v9 beta version after making a few tweaks to the query runner. However I have not been able to get Snowflake queries to run successfully in the tagged v8 version.

Is Snowflake confirmed to be supported in the v8 version of Redash? It appears to me this is not the case given I had to update packages in order for it to show up as a data source and have run into this ’NoneType’ object has no attribute 'annotate_query’ issue when running queries following that update.

:pray:

Sadly this is more of a dynamic “run-time” issue. Since pip reaches out to a living directory. Snowflake definitely works on Redash V8. It’s very much supported. The issue with pip and dependency resolution was solved on the repo here:

I’m not positive that your problem is pip. I’m just proposing it as a possible solution.

Here’s what ought to be true:

  1. You should be able to install Redash with just a few CLI commands (3 or fewer)
  2. Connections to snowflake should work out of the box

If you find that 2 isn’t possible without significant revisions to the source code, then something is wrong and it’s best to treat the problem (which might be pip) rather than the symptoms.