首页 > 解决方案 > 为什么使用 pyspark 从 s3 读取时数据文件头作为数据行读取

问题描述

我正在使用以下代码从 s3 存储桶中读取数据。

dynamic_frame_rates= glue_context.create_dynamic_frame_from_options(connection_type = "s3", connection_options = {"paths": ["s3://path/Master.csv"]}, format = "csv",header:"true")

但是文件标题仍然是作为普通数据行读取的,列名是 col0,col1,col2。

标签: amazon-s3pyspark

解决方案


推荐阅读