How to replicate Glue bookmark in custom spark aws glue script, where i am not able to use dynamic frame to read the data but need to process only new files in the source S3 folder

0

How to replicate Glue bookmark in custom spark aws glue script, where i am not able to use dynamic frame to read the data but need to process only new files in the source S3 folder

KG
gefragt vor 6 Monaten186 Aufrufe
1 Antwort
0

You can't use bookmarks without DynamicFrame, why are you enable to use it (you can convert to DataFrame as soon as you read)?
Otherwise you have to do your own listing of files and passing that truncated list to Spark

profile pictureAWS
EXPERTE
beantwortet vor 6 Monaten
  • the files i am trying to read have a gzip compression and also base64 encoded then its a json file, i am unable to read the file in a dynamic frame , and i want to read only new files which come in the source folder

  • I think the issue there is the base64, that's not standard and you would need to read as text, then decode then parse as json. You can do that with plain Spark but then you would lose the bookmarks. What you could do is read with DynamicFrame as csv (even though is not csv), all the encoding will be in one column and if you don't have memory issues you could decode and parse.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen