Hey,

I keep getting this warning and would like to try make it go away:

[2017-10-20 11:44:14,685] {{__init__.py:45}} INFO - Using executor LocalExecutor
[2017-10-20 11:44:14,735] {{models.py:186}} INFO - Filling up the
DagBag from /home/andrew_maguire/pmc-analytical-data-mart/airflow/dags
/usr/local/lib/python2.7/dist-packages/airflow/utils/helpers.py:351:
DeprecationWarning: Importing PythonOperator directly from <module
'airflow.operators' from
'/usr/local/lib/python2.7/dist-packages/airflow/operators/__init__.pyc'>
has been deprecated. Please import from '<module 'airflow.operators'
from 
'/usr/local/lib/python2.7/dist-packages/airflow/operators/__init__.pyc'>.[operator_module]'
instead. Support for direct imports will be dropped entirely in
Airflow 2.0.
  DeprecationWarning)
[2017-10-20 11:44:19,887] {{cli.py:201}} INFO - Created <DagRun
ga_api_post_data @ 2017-10-04 00:02:00: manual__2017-10-04T00:02:00,
externally triggered: True>


My imports look like:

from airflow import DAG
from datetime import datetime, timedelta
from airflow.contrib.operators.bigquery_operator import BigQueryOperator
from airflow.contrib.operators.bigquery_check_operator import
BigQueryCheckOperator
from airflow.operators.bash_operator import BashOperator
import os
import jinja2
from airflow.operators.python_operator import PythonOperator,
BranchPythonOperator
from airflow.operators.dummy_operator import DummyOperator
from pprint import pprint
from pandas.io import gbq
from airflow.macros import ds_add , ds_format
from airflow.utils.dates import days_ago

It seems to be the PythonOperator it's complaining about.

Was reading AIRFLOW-31 <https://issues.apache.org/jira/browse/AIRFLOW-31> and
think i'm doing it the right way so unsure what import might be triggering
this warning or how i can resolve it.

Any ideas?

Cheers,
Andy

Reply via email to