如何在Cloud Functions中的config.json中提到多个文件夹名称

时间:2019-10-18 16:10:44

标签: python google-cloud-platform google-cloud-functions airflow google-cloud-composer

无论何时将文件放置在GCP存储桶中,我都在使用Cloud Functions触发DAG,例如: “ folder_name”:[“ Ad / pic/"]。

{
"PROJECT_ID":"dev1",
"CLIENT_ID":"urlscjtk.apps.googleusercontent.com",
"WEBSERVER_ID":"323-tp",
"DAG_NAME":["composer_sample_simple_greeting"],
"folder_name":["Ad/pic/"],
"file_format":".csv",
"SERVICE_ACCOUNT":"dev@dev.iam.gserviceaccount.com"
}

它适用于单个文件夹。我希望当文件也放置在多个文件夹中时,此Cloud函数也应触发DAG,但它没有发生,我已经尝试过以下选项,但不起作用

{
"PROJECT_ID":"dev1",
"CLIENT_ID":"urlscjtk.apps.googleusercontent.com",
"WEBSERVER_ID":"323-tp",
"DAG_NAME":["composer_sample_simple_greeting"],
"folder_name":["Ad/pic/","Hit/learn/"],
"file_format":".csv",
"SERVICE_ACCOUNT":"dev@dev.iam.gserviceaccount.com"
}


{
"PROJECT_ID":"dev1",
"CLIENT_ID":"urlscjtk.apps.googleusercontent.com",
"WEBSERVER_ID":"323-tp",
"DAG_NAME":["composer_sample_simple_greeting"],
"folder_name":["Ad/pic/"],
"folder_name":["Hit/learn/"]
"file_format":".csv",
"SERVICE_ACCOUNT":"dev@dev.iam.gserviceaccount.com"
}

请帮助我如何配置多个GCP存储桶文件夹,以便无论何时将文件放置在这些文件夹中,都将触发我的dag。

谢谢

0 个答案:

没有答案