AWS Glue read a csv file encoded in Windows 1252 with extended characters

0

Is there an option to enable the Dyanmicframe Reader to open a file encoded in cp1252 charset (Windows latin with extended characterset) ?

AWS
EXPERT
asked 2 years ago710 views
1 Answer
0
Accepted Answer

Currently, you would need to read the file using the spark.read and than convert to DynamicFrame, see an example below:


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")
AWS
EXPERT
answered 2 years 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