From 27ec9050dff22951217c57ba0a2643ee21f16655 Mon Sep 17 00:00:00 2001 From: Colas Geier Date: Mon, 6 Oct 2025 15:27:45 +0200 Subject: [PATCH] init view --- 15_POLICE/v_infraction_rnn.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 15_POLICE/v_infraction_rnn.py diff --git a/15_POLICE/v_infraction_rnn.py b/15_POLICE/v_infraction_rnn.py new file mode 100644 index 0000000..012011e --- /dev/null +++ b/15_POLICE/v_infraction_rnn.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +# -*- coding: UTF-8 -*- + +sql = ''' +SELECT + split_part(b.data_id,':',2)::uuid data_id, + "submitterName" digitiser, + autre_catego_sensi, + autre_type_sanct, + catego_controle, + catego_sensibil, + "Commentaire_remarque_nombre_de_tentes", + "Conformit_du_contr_le", + day "date", + "heure", + infract_nb, + nat_operation, + nature_pers, + nb_pers_control, + nb_pers_sensibil, + nb_verb, + nom_agent, + type_sanct, + "submissionDate" date_saisie, + "updatedAt" date_maj, + st_force2d(st_geomfromgeojson(replace(COALESCE(geom,point_carte),'\','')))::geometry(geometry, 4326) AS geom + +FROM police.infraction_rnn_submissions_data AS b +''' \ No newline at end of file