Skip to content

Conversation

@Taragolis
Copy link
Contributor

OpenLineage integration tried to use non existed hook method, which failed if correct configure inheritance for DBApiHook (upcoming PR)

airflow/providers/snowflake/hooks/snowflake.py:483: error: "SnowflakeHook" has
no attribute "get_database_info"  [attr-defined]
            namespace = SQLParser.create_namespace(self.get_database_info(...
                                                   ^~~~~~~~~~~~~~~~~~~~~~

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@Taragolis Taragolis added the type:bug-fix Changelog: Bug Fixes label Nov 20, 2023
@boring-cyborg boring-cyborg bot added area:providers provider:snowflake Issues related to Snowflake provider labels Nov 20, 2023
@potiuk
Copy link
Member

potiuk commented Nov 20, 2023

Should we have some more unit tests for those @mobuchowski ?

@Taragolis
Copy link
Contributor Author

Yeah it would be nice to have unit tests for that.

I'm not familiar with OpenLineage integration otherwise I would be write this tests and cover this part into the hook.py

@Taragolis Taragolis merged commit f8dd192 into apache:main Nov 20, 2023
@Taragolis Taragolis deleted the fix-snowflake-openlinage branch November 20, 2023 15:55
@mobuchowski
Copy link
Contributor

Yeah... I guess this worked because the error was caught later:

@JDarDagran
Copy link
Contributor

Two things failed: insufficient tests and except block that should be rather changed into check with hasattr.

I'll fix that.

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

Labels

area:providers provider:snowflake Issues related to Snowflake provider type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants