读取 apache beam 数据帧中的压缩 json 文件

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

看起来 beam dataframe 支持读取压缩的 json 文件apache_beam.dataframe.io.read_json

但是,当我尝试通过代码读取文件时:

from apache_beam.dataframe.io import read_json,
beam_df = pipeline | read_json(path=input_file, lines=True, compression_type="gzip")

报错

AttributeError: 'CompressedFile' object has no attribute 'writable'

我的实现是否正确?

TIA

google-cloud-dataflow apache-beam apache-beam-io
© www.soinside.com 2019 - 2024. All rights reserved.