eladkal commented on code in PR #64174:
URL: https://github.com/apache/airflow/pull/64174#discussion_r2983246677
##########
providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_jdbc_script.py:
##########
@@ -26,7 +26,12 @@
try:
from pyspark.sql import SparkSession
except ImportError:
- pass
+ from airflow.providers.common.compat.sdk import
AirflowOptionalProviderFeatureException
Review Comment:
It's not about Airflow not being installed. It's about the optional
dependency of pyspark not being installed.
https://github.com/apache/airflow/pull/60031 changed it from mandatory to
optional.
`AirflowOptionalProviderFeatureException` is the convention for missing
extra package in a provider to use a feature
https://github.com/apache/airflow/blob/a6ff00f43cded82e1a832cbb141e4ad946b4e519/providers/databricks/src/airflow/providers/databricks/hooks/databricks_sql.py#L201-L205
https://github.com/apache/airflow/blob/afce4ddd8d8a4b1c6b8892e0882bac10b1073ceb/providers/apache/hive/src/airflow/providers/apache/hive/hooks/hive.py#L1156-L1160
--
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]