Does Redshift Spectrum support Incremental Ingestion

0

I have created an External Table using Redshift Spectrum and using AWS Glue to crawl deeply nested json files coming into s3 bucket every second.

I was able to populate a redshift table by extracting values from external table. But facing an issue with the incremental ingestion as all the values are loaded into Redshift everytime for new files being crawled.

How to capture the new data in s3 bucket so that only new columns got loaded into Redshift table.

Sample file: { "Messages":[ { "Attributes":{"docType":"Test"}, "Data":{ "key1":"value1", "key2":["a1":"v1", "a2":"v2"], "key3":{{"b1":"u1"}, "b2":[{"c1":"u2"}, {"c2":"u3"} ] } } }, { "Attributes":{"docType":"Test2"}, "Data":{ "key1":"value1", "key2":["a1":"v1", "a2":"v2"], "key3":{{"b1":"u1"}, "b2":[{"c1":"u2"}, {"c2":"u3"} ] } } } ] }

sravan
preguntada hace 2 meses207 visualizaciones
2 Respuestas
0

You cannot just read the new columns, for that you would need a columnar format like parquet.
Also incremental ingestion normally refers to loading new files, for that you could use Glue bookmarks (running a Glue job instead of Spectrum) or putting new files on different folders(partitions) and telling Spectrum to load just that)

profile pictureAWS
EXPERTO
respondido hace 2 meses
  • How to dynamically change the partition values so that we could automate this job !

  • If you mean filtering partitions, you would need to build your query with the values you need, for instance using the current date for date related columns

0
profile pictureAWS
EXPERTO
respondido hace 2 meses
  • We want to explore the options to load the data without flattening the json using AWS Glue job to reduce the billing

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas