GCStoGCSOperator 跨项目 Composer/Airflow 移动选项
因此,我利用 GCStoGCSOperator 从报告 API 获取报告,然后对项目中的报告进行一些更新,但当我尝试将该文件移动到项目 2 时,它会抛出错误说明该存储桶不存在。
我目前有一个 SA 帐户,该帐户附加到两个项目中的两个 GCS 存储桶。但是,我无法执行以下操作:
move_single_file = GCSToGCSOperator(
task_id="move_single_file",
source_bucket=BUCKET_1_SRC,
source_object=OBJECT_1,
destination_bucket=BUCKET_1_DST,
destination_object="backup_" + OBJECT_1,
move_object=True,
)
其中 BUCKET_1_SRC
是 Project 1
,BUCKET_1_DST
是 Project 2
。我该如何做才能将文件从 Project 1
移动到 Project 2
?我当前收到 404 POST 错误
,指出 Bucket 不存在
。是否有我可能缺少的 destination_project
变量?
任何帮助将不胜感激!
So I'm utilizing the GCStoGCSOperator
to grab a report from the reporting API then doing a few updates to the report in a Project, but then when I try to move that file to Project 2 its throwing an error stating that bucket doesn't exist.
I currently have a SA account that is attached to both GCS buckets in both Projects. But, I'm unable to do the following Operator:
move_single_file = GCSToGCSOperator(
task_id="move_single_file",
source_bucket=BUCKET_1_SRC,
source_object=OBJECT_1,
destination_bucket=BUCKET_1_DST,
destination_object="backup_" + OBJECT_1,
move_object=True,
)
Where BUCKET_1_SRC
is Project 1
and BUCKET_1_DST
is Project 2
. How would I go about doing this to make it so it moves a file from Project 1
and moves it over to Project 2
? I'm currently getting a 404 POST Error
stating that the Bucket does not exist
. Is there a destination_project
variable that I may be missing in this?
Any help would be greatly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论