AWS Glue for handling incremental data loading of different sources

Viewed 511

I am planning to leverage AWG Glue for incremental data processing. Based on hourly schedule a trigger will invoke Glue Crawler and Glue ETL Job which loads incremental data to catalog and processed the incremental files through ETL. And looks pretty straight forward as well. With this I ran into couple of issues.

  1. Let's say we have data getting streamed for various tables and for various data bases to S3 locations, and we want to create data bases and tables based on landing data. eg: s3://landingbucket/database1/table1/YYYYMMDDHH/some_incremental_files.json s3://landingbucket/database1/table2/YYYYMMDDHH/some_incremental_files.json s3://landingbucket/database1/somedata/tablex/YYYYMMDDHH/some_incremental_files.json s3://landingbucket/database2/table1/YYYYMMDDHH/some_incremental_files.json s3://landingbucket/datasource_external/data/table1/YYYYMMDDHH/some_incremental_files.json

  2. With the data getting landed in above s3 structure, we want to create glue catalog for these data bases and tables with limited Crawlers. Here we have number of databases as number of crawlers. Note: We have a crawler for database1, its creating tables under database1, which is good and as expected, but we have an exceptional guy "somedata" in database1, whose structure is not in standard with other tables, with this it created table somedata and with partitions "partitions_0=tablex and partition_1=YYYYMMDDHH". Is there a better way to handle these with less number of crawlers than one crawler per data base.

  3. Glue ETL, we have similar challenge, we want to format the incoming data to standard parquet format, and have one bucket per database and tables will be sitting under that, as the data is huge we don't want one table with partitions as data_base and data. So that we will not getting into s3 slowdown issues for the incoming load. As many teams will be querying the data from this, so we don't want to have s3 slowdown issue coming for their analytics jobs.

  4. Instead of having one ETL job per table, per data base, is there a way we can handle this with limited jobs. As and when new tables are coming, there should be a way the ETL job should transform this json data to formatted zone. So input data and output path both can be handled dynamically, instead of hardcoding.

Open for any better idea!

Thanks, Krish!

0 Answers
Related