sampippin
sampippin

Reputation: 133

Importing Airflow Plugin

I am currently trying to push data from Salesforce to BigQuery using Airflow. I am new to airflow and currently I'm following this link:

https://github.com/TheF1rstPancake/airflow-salesforce

When I try to import the plugin from airflow.operators import SalesforceToFileOperator,

I get the error message stating ImportError: cannot import name 'SalesforceToFileOperator'

How do I import this plugin on Airflow?

Current Directory Structure

DAGS

  salesforce_bg.py

plugins

airflow-salesforce

      __init__.py
      hooks
      operators

What am I doing wrong?

Upvotes: 0

Views: 1431

Answers (1)

Eben du Toit
Eben du Toit

Reputation: 466

From the official Airflow documentation: here

The python modules in the plugins folder get imported, and hooks, operators, sensors, macros, executors and web views get integrated to Airflow’s main collections and become available for use.

So, you only need to place salesforce_bg.py into the /plugins folder of your Airflow server.

Upvotes: 1

Related Questions