AWS Glue可以读取使用Windows 1252编码的带扩展字符的csv文件。

0

【以下的问题经过翻译处理】 是否有选项可以启用Dynamicframe Reader在cp1252字符集(Windows Latin扩展字符集)中打开编码的文件?

profile picture
EXPERT
asked 5 months ago9 views
1 Answer
0

【以下的回答经过翻译处理】 目前,您需要使用spark.read读取文件,然后转换为DynamicFrame,参见下面的示例:

df_1252_all = spark.read.option("header", "true").option("charset", "cp1252").csv("s3a://My-BUCKET/cp1252_all.csv") dyn_all= DynamicFrame.fromDF(df_1252_all, glueContext, "dyn_all")

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions