You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ajout de données depuis SeaMIS par fichiers CSV (#145)
* Work on CSV files
* Create and describe aggregates
* Ajout tables de codes
* Check mapping completeness
* Work on unique codes
* Download remote FTP folder
* Keep latest version
* Improve operations to keep
* Work on DAG download_secmar_csv_ftp
* Add other tasks
* Add process_all_days
* Work on replacement mapping
* Add create_cleaned_aggregate_files
* Resolve path
* Add base Embulk files
* Base Embulk import
* Fix filepath
* Clean timestamps
* Clean force fields
* Improve datetimes parsing
* Improve drop_duplicates for operations
* Converssion radians en degrés pour le vent
* Add pourquoi_alerte in secmar_operation_id
* Améliore les codes
* Travaille sur les colonnes cross_sitrep
* Rework Embulk order
* Rework cross_sitrep
* Update checks with new cross_sitrep format
* Add 3 new cols in operations
* Rework est_metropolitain
* Work on insert SQL scripts
* Fix duration computation
* Rewrite run SQL task
* Start to write checks
* Add missing dependency
* Download next day if available
* Replace ShortCircuit with BranchOperator
* Move to main DAG
* Update inset for secmar_csv_operations
* Mappe Polynésie française en Polynésie
* Replace more NA fields for the map
* Changement d'organisation
select 'Corsen SAR 2017/1305' cross_sitrep ,'2017-12-16 11:57:00+00' expected_time UNION
130
+
select 'Corsen SAR 2018/1503' cross_sitrep ,'2018-10-13 08:13:00+00' expected_time UNION
131
+
select 'Étel SAR 2018/3473' cross_sitrep ,'2018-12-20 08:51:00+00' expected_time UNION
132
+
select 'Corsen SAR 2019/2604' cross_sitrep ,'2019-12-20 13:26:00+00' expected_time
133
133
) t on t.cross_sitrep = op.cross_sitrep and op.date_heure_reception_alerte::text = t.expected_time
134
134
) t
135
135
""",
@@ -140,3 +140,33 @@ def checks():
140
140
where concerne_snosan and avec_clandestins
141
141
""",
142
142
}
143
+
144
+
145
+
defsecmar_csv_checks():
146
+
return {
147
+
"operations_count_2021": """
148
+
select count(1) between 16800 and 16820
149
+
from operations
150
+
where extract(year from date_heure_reception_alerte) = 2021
151
+
""",
152
+
"operations_count_up_to_2021": """
153
+
select count(1) between 321500 and 321600
154
+
from operations
155
+
where extract(year from date_heure_reception_alerte) <= 2021
156
+
""",
157
+
"operations_count_cross_2021": """
158
+
select count(distinct "cross") = 11
159
+
from operations
160
+
where extract(year from date_heure_reception_alerte) = 2021
161
+
""",
162
+
"operations_count_2021_from_secmar_csv": """
163
+
select count(1) between 14670 and 14680
164
+
from operations
165
+
where extract(year from date_heure_reception_alerte) = 2021 and operation_id in (select secmar_operation_id from secmar_csv_operation)
166
+
""",
167
+
"est_metropolitain": """
168
+
select string_agg(distinct "cross"::varchar, '|' order by "cross"::varchar) = 'Antilles-Guyane|Gris-Nez|Guadeloupe|Guyane|La Réunion|Martinique|Mayotte|Nouvelle-Calédonie|Polynésie'
0 commit comments