@@ -247,3 +247,53 @@ module "housing_boundaries_geolive_ingestion_job" {
247247 table_prefix = null
248248 }
249249}
250+
251+ module "llpg_geolive_database_ingestion" {
252+ count = local. is_live_environment ? 1 : 0
253+ tags = module. tags . values
254+
255+ source = " ../modules/database-ingestion-via-jdbc-connection"
256+
257+ name = " geolive-llpg-schema"
258+ jdbc_connection_url = " jdbc:postgresql://geolive-db-prod.cjgyygrtgrhl.eu-west-2.rds.amazonaws.com:5432/geolive"
259+ jdbc_connection_description = " JDBC connection to Geolive PostgreSQL database, to access the llpg schema only"
260+ jdbc_connection_subnet = data. aws_subnet . network [local . instance_subnet_id ]
261+ identifier_prefix = local. short_identifier_prefix
262+ database_secret_name = " database-credentials/geolive-llpg"
263+ schema_name = " llpg"
264+ job_schedule = " cron(1 1 ? * * *)"
265+ }
266+
267+ module "llpg_geolive_ingestion_job" {
268+ count = local. is_production_environment ? 1 : 0
269+ source = " ../modules/aws-glue-job"
270+ is_live_environment = local. is_live_environment
271+ is_production_environment = local. is_production_environment
272+
273+ department = module. department_unrestricted
274+ job_name = " ${ local . short_identifier_prefix } geolive llpg tables ingestion"
275+ glue_version = " 4.0"
276+ script_s3_object_key = aws_s3_object. ingest_database_tables_via_jdbc_connection . key
277+ spark_ui_output_storage_id = module. spark_ui_output_storage . bucket_id
278+ helper_module_key = aws_s3_object. helpers . key
279+ pydeequ_zip_key = aws_s3_object. pydeequ . key
280+ jdbc_connections = [module . llpg_geolive_database_ingestion [0 ]. jdbc_connection_name ]
281+ triggered_by_crawler = module. llpg_geolive_database_ingestion [0 ]. crawler_name
282+ workflow_name = module. llpg_geolive_database_ingestion [0 ]. workflow_name
283+ job_parameters = {
284+ " --s3_ingestion_bucket_target" = " s3://${ module . raw_zone . bucket_id } /unrestricted/geolive/llpg/"
285+ " --s3_ingestion_details_target" = " s3://${ module . raw_zone . bucket_id } /unrestricted/geolive/llpg/ingestion-details/"
286+ " --source_data_database" = module.llpg_geolive_database_ingestion[0 ].ingestion_database_name
287+ }
288+ crawler_details = {
289+ database_name = module.department_unrestricted.raw_zone_catalog_database_name
290+ s3_target_location = " s3://${ module . raw_zone . bucket_id } /unrestricted/geolive/llpg/"
291+ configuration = jsonencode ({
292+ Version = 1.0
293+ Grouping = {
294+ TableLevelConfiguration = 5
295+ }
296+ })
297+ table_prefix = null
298+ }
299+ }
0 commit comments