我正在尝试从GS存储桶中读取数据,并将其输出到另一个GS存储桶(按自定义列,arrival_date划分)到另一个存储桶中。数据为实木复合地板格式。寻找基于Apache Beam Python的源代码以在数据流中运行。
源数据具有三列:组织,名称,到达时间 预期输出:组织,名称,到达时间到组织明智的文件夹中。
# Instantiate a pipeline with all the pipeline options
p = beam.Pipeline(options=options)
#Processing and structure of pipeline
p \
| 'Input: QueryTable' >> beam.io.Read(beam.io.BigQuerySource(
query=known_args.bql,use_standard_sql=True)) \
| 'Output: Export to Parquet' >> beam.io.parquetio.WriteToParquet(
file_path_prefix=known_args.output,schema=parquet_schema,file_name_suffix='.parquet'
)
我正在寻找有关如何实现对按自定义列(在这种情况下为org)分区的GS文件夹进行写入的答案