Facebook Ads 到 GCS Operators¶
先決條件任務¶
要使用這些 operator,您必須完成以下幾步
使用 Cloud Console 選擇或建立一個 Cloud Platform 專案。
為您的專案啟用賬單功能,詳見 Google Cloud 文件。
啟用 API,詳見 Cloud Console 文件。
透過 pip 安裝 API 庫。
pip install 'apache-airflow[google]'安裝 中提供了詳細資訊。
FacebookAdsReportToGcsOperator¶
使用 FacebookAdsReportToGcsOperator 來執行 Facebook 廣告報告抓取並載入到 GCS。
tests/system/google/cloud/transfers/example_facebook_ads_to_gcs.py
run_operator = FacebookAdsReportToGcsOperator(
task_id="run_fetch_data",
owner="airflow",
bucket_name=BUCKET_NAME,
parameters=PARAMETERS,
fields=FIELDS,
object_name=GCS_OBJ_PATH,
)
參考¶
更多資訊請參閱