【问题标题】:Reading CSV header and saving with Dataflow Beam on Python在 Python 上使用 Dataflow Beam 读取 CSV 标头并保存
【发布时间】:2021-06-11 13:15:21
【问题描述】:

如何在 Apache Beam Python 中读取第一行并存储标头数据?

【问题讨论】:

  • 能否为这个问题添加更多细节?

标签: apache-beam dataflow


【解决方案1】:

看看这个example。看看UsCovidDataCsvReader 是如何解析输入的。

基本思路是

  • 读取标头并从中构建架构
  • skip_header_lines=1读取文件
  • 使用架构解析输入以构建 PCollection

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多