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

[BUG] Unable to get both snowflake and databricks working with gx at the same time #9650

Open
satniks opened this issue Mar 22, 2024 · 4 comments

Comments

@satniks
Copy link

satniks commented Mar 22, 2024

I am not able to get both snowflake and databricks working with great-expectations 0.18.11 and 0.18.12. Could not find python packages setup which works for both of them.

I tried following:

  1. Installed following libraries for databricks
    "pip install great_expectations[sqlalchemy]
    "pip install great_expectations[databricks]"

  2. Wrote expectations for databricks data source and it works nicely.

  3. Then I Installed following library for snowflake
    "pip install great_expectations[snowflake]",

  4. Then I wrote expectations for snowflake which also works as expected. But it broke my databricks setup. When I executed my existing databricks expectations, I got following error:

    raise SQLDatasourceError(
    great_expectations.datasource.fluent.sql_datasource.SQLDatasourceError: Unable to create a SQLAlchemy engine due to the following exception: module 'sqlalchemy.types' has no attribute 'Uuid'

May be this is because installation of "great_expectations[sqlalchemy]" downgrades SQLAlchemy from 2.0.28 to 1.4.52.

Databricks and Snowflake are two important data sources which should work together with common python environment. Can someone provide "pip freeze" setup which works for both?

@satniks satniks changed the title [BUG] Unable to get both snowflake and databricks working with great-expectations 0.18.11 and 0.18.12 [BUG] Unable to get both snowflake and databricks working with gx version 0.18.11 and 0.18.12 Mar 22, 2024
@satniks
Copy link
Author

satniks commented Mar 22, 2024

Following issue could be related:
databricks/databricks-sql-python#291

@satniks satniks changed the title [BUG] Unable to get both snowflake and databricks working with gx version 0.18.11 and 0.18.12 [BUG] Unable to get both snowflake and databricks working with gx at the same time Mar 23, 2024
@satniks
Copy link
Author

satniks commented Mar 25, 2024

It seems snowflake-sqlalchemy team is going to add support for sqlalchemy 2.x and once it is done, there will be a common sqlalchemy version that will work with databricks. Not sure about the timelines though. I hope great-expectations 1.0 will support latest snowflake and databricks versions at the same time in common python environment.

snowflakedb/snowflake-sqlalchemy#380

@Kilo59
Copy link
Member

Kilo59 commented Mar 28, 2024

@satniks Yes, as soon as the snowflake sqalalchemy package supports sqlalchemy 2, things should work. Until then, there's nothing we can do about it.

@satniks
Copy link
Author

satniks commented Mar 28, 2024

Thanks @Kilo59 for confirmation. I will wait for sqlalchemy 2 support in snowflake-sqlalchemy.

Till then, I will be using the workaround provided here. It works nicely.

snowflakedb/snowflake-sqlalchemy#380 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants