How to Solve NameError: name 'spark_submit_operator' is not defined -- airflow

Solution: Import the 'spark_submit_operator' module

# Add the following line to the top of your code
from airflow.contrib.operators import spark_submit_operator

 

For more information:
airflow spark_submit_operator