Facebook Ads To GCS Operators¶
Prerequisite Tasks¶
To use these operators, you must do a few things:
Select or create a Cloud Platform project using the Cloud Console.
Enable billing for your project, as described in the Google Cloud documentation.
Enable the API, as described in the Cloud Console documentation.
Install API libraries via pip.
pip install 'apache-airflow[google]'Detailed information is available for Installation.
FacebookAdsReportToGcsOperator¶
Use the
FacebookAdsReportToGcsOperator
to execute a Facebook ads report fetch and load to GCS.
run_operator = FacebookAdsReportToGcsOperator(
task_id="run_fetch_data",
owner="airflow",
bucket_name=GCS_BUCKET,
parameters=PARAMETERS,
fields=FIELDS,
gcp_conn_id=GCS_CONN_ID,
object_name=GCS_OBJ_PATH,
)