sunank200 commented on code in PR #59921:
URL: https://github.com/apache/airflow/pull/59921#discussion_r2655384966
##########
providers/openlineage/src/airflow/providers/openlineage/utils/sql.py:
##########
@@ -217,6 +235,11 @@ def create_filter_clauses(
therefore it is expected the table has them defined.
:param uppercase_names: if True use schema and table names uppercase
"""
+ if and_ is None or or_ is None:
+ raise AirflowOptionalProviderFeatureException(
+ "sqlalchemy is required for SQL filter clause generation. "
+ "Install it with: pip install
'apache-airflow-providers-openlineage[sqlalchemy]'"
+ )
Review Comment:
Changed it
##########
providers/openlineage/src/airflow/providers/openlineage/utils/sql.py:
##########
@@ -157,6 +163,18 @@ def create_information_schema_query(
sqlalchemy_engine: Engine | None = None,
) -> str:
"""Create query for getting table schemas from information schema."""
+ if (
+ Column is None
+ or MetaData is None
+ or Table is None
+ or and_ is None
+ or or_ is None
+ or union_all is None
+ ):
+ raise AirflowOptionalProviderFeatureException(
+ "sqlalchemy is required for SQL schema query generation. "
+ "Install it with: pip install
'apache-airflow-providers-openlineage[sqlalchemy]'"
+ )
Review Comment:
this is better.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]