gcloud beta composer environments storage plugins import --environment dw --location us-central1 --source=custom_operators.py
from airflow.operators import BigQuerySensor
Broken DAG: [/home/airflow/gcs/dags/ref_dash_dag.py] cannot import name BigQuerySensor
--
You received this message because you are subscribed to the Google Groups "cloud-composer-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-composer-di...@googlegroups.com.
To post to this group, send email to cloud-compo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-composer-discuss/aeab287a-e469-4dc2-9fc9-34375a53b168%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
gcloud beta composer environments storage plugins import --environment dw --location us-central1 --source=custom_operators.py
If your goal is import a custom operator into your own DAG, here's another way for you to do it (and how I discovered to do this yesterday): https://groups.google.com/forum/#!topic/cloud-composer-discuss/wTI7Pbwc6ZY.A general question for folks working on Airflow/Composer: if I want to import custom operators/sensors/hooks into my DAGs, why would I make a plugin for it vs. package the code alongside my DAGs?Vikram
On Tue, Jun 19, 2018 at 6:36 AM Conrad Lee <con...@parsely.com> wrote:
I'm having a hard time getting a custom operator to work. The main issue is that the cloud composer plugins documentation doesn't include a working example.--I've attached the file in which I define my custom operator (which is a sensor) and add it to a plugin. I then upload this to the plugins folder in my google cloud storage bucket using the commandgcloud beta composer environments storage plugins import --environment dw --location us-central1 --source=custom_operators.pyI import the operator in my dag usingfrom airflow.operators import BigQuerySensorHowever, in the Airflow webserver UI I see that my DAG doesn't load, and I see an error which says:Broken DAG: [/home/airflow/gcs/dags/ref_dash_dag.py] cannot import name BigQuerySensorAny idea what I'm doing wrong? Is there something special I need to do to get airflow to pick up on the plugin?
You received this message because you are subscribed to the Google Groups "cloud-composer-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-composer-discuss+unsub...@googlegroups.com.
To post to this group, send email to cloud-composer-discuss@googlegroups.com.
Broken DAG: [/home/airflow/gcs/dags/ref_dash_dag.py] cannot import name BigQuerySensor