我们可以在apache-beam中使用FTP导入数据吗?

问题描述 投票:0回答:1

我正在使用Apache-Beam编写一个数据流工作,需要使用FTPS [from ftplib import FTP_TLS] 服务器在BigQuery中导入数据。但当我尝试导入FTPS类[ftps = FTP_TLS('ftp.xxxx.xxx')]时,我得到了 "TypeError: can't pickle SSLContext objects "的错误信息。我尝试将包放在setup.py中,导入ftplib包,但同样的错误依然存在。

Apache-Beam是否不支持来自FTPS服务器的数据,如果支持,如何解决这个错误?

ftp google-cloud-functions google-cloud-dataflow apache-beam ftps
1个回答
0
投票

我不确定,因为你没有提供一个代码片段。启动.所有在init中创建的对象都必须是可序列化的,你可以尝试在Process函数中创建对象。

你可以尝试在Process函数中创建对象.更多细节请看: 请看Ankur对这个问题的回答

更多信息请参见文档。

https:/beam.apache.orgdocumentationprogramming-guide#core-beam-transform。

https:/beam.apache.orgdocumentationprogramming-guide#requirements-for-writing-user-code-for-beam-transform。

© www.soinside.com 2019 - 2024. All rights reserved.