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
demandé il y a 2 ans721 vues
1 réponse
0
Réponse acceptée

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
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions