繁体   English   中英

pyspark:Configparser 未从谷歌存储读取配置文件

[英]pyspark : Configparser is not reading config file from google storage

我正在尝试通过 dataproc 运行的 pyspark 脚本从谷歌存储桶中读取配置文件。 但是文件没有被读取。

config = configparser.ConfigParser()
config.read('gs://<<google_bucket_location>>/example.ini')
[]

请注意,configparser 只读取本地文件。 最好的选择是将配置文件从 GCS 下载到 tmp 目录并从那里读取。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM