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

Implement support for SQLAlchemy 2.0 #184

Open
Vitor-Avila opened this issue Jan 27, 2023 · 1 comment
Open

Implement support for SQLAlchemy 2.0 #184

Vitor-Avila opened this issue Jan 27, 2023 · 1 comment

Comments

@Vitor-Avila
Copy link
Contributor

SQLAlchemy 2.0 was recently released. When using this version, the CLI throws an error when trying to sync a BQ DB from DBT.

@Vitor-Avila
Copy link
Contributor Author

This code (and other uses of the sqlalchemy.URL class), doesn't work with the new SQLAlchemy version since it defaults to hide_password: bool = True (reference).

We might need to include .render_as_string(hide_password = False):

return {
        "sqlalchemy_uri": str(
            URL(
                drivername="postgresql+psycopg2",
                username=username,
                password=password,
                host=host,
                port=port,
                database=dbname,
                query=query,
            ).render_as_string(hide_password = False),
        ),
    }

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

No branches or pull requests

1 participant