From a7cf1647f87dea27e887a6192a7a6f6520c3f2ef Mon Sep 17 00:00:00 2001 From: Kim JiMyeung Date: Tue, 23 Dec 2025 14:33:53 +0900 Subject: [PATCH] =?UTF-8?q?event=EC=86=8D=EC=84=B1=EB=93=A4=20snp=5Fdata?= =?UTF-8?q?=20=EC=A0=81=EC=9E=AC=20->=20new=5Fsnp=20=EC=A0=81=EC=9E=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jobs/event/batch/repository/EventSql.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/snp/batch/jobs/event/batch/repository/EventSql.java b/src/main/java/com/snp/batch/jobs/event/batch/repository/EventSql.java index 321dc9d..02d139d 100644 --- a/src/main/java/com/snp/batch/jobs/event/batch/repository/EventSql.java +++ b/src/main/java/com/snp/batch/jobs/event/batch/repository/EventSql.java @@ -3,7 +3,7 @@ package com.snp.batch.jobs.event.batch.repository; public class EventSql { public static String getEventDetailUpdateSql(){ return """ - INSERT INTO snp_data.event_detail ( + INSERT INTO new_snp.event_detail ( event_id, incident_id, ihslrorimoshipno, published_date, event_start_date, event_end_date, attempted_boarding, cargo_loading_status_code, casualty_action, casualty_zone, casualty_zone_code, component2, country_code, @@ -64,14 +64,13 @@ public class EventSql { vessel_gt = EXCLUDED.vessel_gt, vessel_name = EXCLUDED.vessel_name, vessel_type = EXCLUDED.vessel_type, - vessel_type_decode = EXCLUDED.vessel_type_decode, - batch_flag = 'N'; + vessel_type_decode = EXCLUDED.vessel_type_decode """; } public static String getEventCargoSql(){ return """ - INSERT INTO snp_data.event_cargo ( + INSERT INTO new_snp.event_cargo ( event_id, "sequence", ihslrorimoshipno, "type", quantity, unit_short, unit, cargo_damage, dangerous, "text" ) @@ -86,14 +85,13 @@ public class EventSql { unit = EXCLUDED.unit, cargo_damage = EXCLUDED.cargo_damage, dangerous = EXCLUDED.dangerous, - "text" = EXCLUDED."text", - batch_flag = 'N'; + "text" = EXCLUDED."text" """; } public static String getEventRelationshipSql(){ return """ - INSERT INTO snp_data.event_relationship ( + INSERT INTO new_snp.event_relationship ( incident_id, event_id, relationship_type, relationship_type_code, event_id_2, event_type, event_type_code ) @@ -104,14 +102,13 @@ public class EventSql { ON CONFLICT (incident_id, event_id, event_id_2, event_type_code, relationship_type_code) DO UPDATE SET relationship_type = EXCLUDED.relationship_type, - event_type = EXCLUDED.event_type, - batch_flag = 'N'; + event_type = EXCLUDED.event_type """; } public static String getEventHumanCasualtySql(){ return """ - INSERT INTO snp_data.event_humancasualty ( + INSERT INTO new_snp.event_humancasualty ( event_id, "scope", "type", qualifier, "count" ) VALUES ( @@ -119,8 +116,7 @@ public class EventSql { ) ON CONFLICT (event_id, "scope", "type", qualifier) DO UPDATE SET - "count" = EXCLUDED."count", - batch_flag = 'N'; + "count" = EXCLUDED."count" """; } }