#!/usr/bin/env python from shared.utils.check_imported_data import ( run_sql_checks, assert_count_minimum, ) sql_checks = [ ("count", "select count(*) from corona_gevallen_new", assert_count_minimum(300)), ( "columns", """ select count(column_name) from information_schema.columns where table_schema = 'public' and table_name = 'corona_gevallen_new' and column_name in ('id', 'datum', 'gemeente_naam', 'gemeente_code', 'provincie', 'aantal_totaal', 'aantal_ziekenhuisopnames', 'aantal_sterfgevallen') """, assert_count_minimum(8), ), ] if __name__ == "__main__": run_sql_checks(sql_checks)
#!/usr/bin/env python from shared.utils.check_imported_data import ( run_sql_checks, all_valid_url, assert_count_minimum, assert_count_zero, ) sql_checks = [ ("count", "select count(*) from bb_quotum_new", assert_count_minimum(90)), ( "count", """ select count(column_name) from information_schema.columns where table_schema = 'public' and table_name = 'bb_quotum_new' and column_name in ('wijk', 'availability_color', 'geo') """, assert_count_minimum(3), ), ( "geometrie", """ select count(*) from bb_quotum_new where geo is null or ST_IsValid(geo) = false or ST_GeometryType(geo) <> 'ST_MultiPolygon' """, assert_count_zero(), ), ] if __name__ == "__main__": run_sql_checks(sql_checks)
#!/usr/bin/env python from shared.utils.check_imported_data import run_sql_checks, assert_count_minimum sql_checks = [ ('count', "select count(*) from openbare_verlichting_new", assert_count_minimum(129410)), ] if __name__ == '__main__': run_sql_checks(sql_checks)
#!/usr/bin/env python from shared.utils.check_imported_data import run_sql_checks, all_valid_url, assert_count_minimum, assert_count_zero sql_checks = [ ('count', "select count(*) from bb_quotum_new", assert_count_minimum(90)), ('count_col', """ select count(column_name) from information_schema.columns where table_schema = 'public' and table_name = 'bb_quotum_new' and column_name in ('wijk', 'availability_color', 'geo') """, assert_count_minimum(3)), ('geometrie', """ select count(*) from bb_quotum_new where geo is null or ST_IsValid(geo) = false or ST_GeometryType(geo) <> 'ST_MultiPolygon' """, assert_count_zero()), ('count1', "select count(*) from omzettingen_quotum_new", assert_count_minimum(90)), ('count_col1', """ select count(column_name) from information_schema.columns where table_schema = 'public' and table_name = 'omzettingen_quotum_new' and column_name in ('wijk', 'availability_color', 'geo') """, assert_count_minimum(3)), ('geometrie1', """ select count(*) from omzettingen_quotum_new where geo is null or ST_IsValid(geo) = false or ST_GeometryType(geo) <> 'ST_MultiPolygon' """, assert_count_zero()), ] if __name__ == '__main__': run_sql_checks(sql_checks)
#!/usr/bin/env python from shared.utils.check_imported_data import run_sql_checks, all_valid_url, assert_count_minimum, assert_count_zero sql_checks = [ ('count', "select count(*) from winkgeb_new", assert_count_minimum(75)), # ('columns', """ # select column_name from information_schema.columns where # table_schema = 'public' and table_name = 'vezips_new' # """, lambda x: x == [('ogc_fid',), ('wkb_geometry',), ('soortcode',), ('vezip_nummer',), ('vezip_type',), # ('standplaats',), ('jaar_aanleg',), ('venstertijden',), ('toegangssysteem',), # ('beheerorganisatie',), ('bijzonderheden',)]), ('geometrie', """ select count(*) from winkgeb_new where wkb_geometry is null or ST_GeometryType(wkb_geometry) not in ('ST_Polygon', 'ST_MultiPolygon') """, assert_count_zero()), ] if __name__ == '__main__': run_sql_checks(sql_checks)
#!/usr/bin/env python from shared.utils.check_imported_data import ( run_sql_checks, all_valid_url, assert_count_minimum, assert_count_zero, ) sql_checks = [ ("count", "select count(*) from milieuzones_new", assert_count_minimum(5)), ( "columns", """ select column_name from information_schema.columns where table_schema = 'public' and table_name = 'milieuzones_new' """, lambda x: x == [ ("ogc_fid", ), ("wkb_geometry", ), ("id", ), ("verkeerstype", ), ("vanafdatum", ), ("color", ), ], ), ( "geometrie", """ select count(*) from milieuzones_new where wkb_geometry is null or ST_GeometryType(wkb_geometry) <> 'ST_MultiPolygon' """,
#!/usr/bin/env python from shared.utils.check_imported_data import run_sql_checks, assert_count_zero, assert_count_minimum sql_checks = [ ('count', "select count(*) from parkeerzones_new", assert_count_minimum(100)), ('count_uitz', "select count(*) from parkeerzones_uitz_new", assert_count_minimum(60)), ('geometrie', """ select count(*) from parkeerzones_new where wkb_geometry is null or ST_GeometryType(wkb_geometry) <> 'ST_Polygon' """, assert_count_zero()), ('geometrie', """ select count(*) from parkeerzones_uitz_new where wkb_geometry is null or ST_GeometryType(wkb_geometry) <> 'ST_Polygon' """, assert_count_zero()), # ('columns', """ #select column_name from information_schema.columns where #table_schema = 'public' and table_name = 'hoofdroutes_new' # """, lambda x: x == [("ogc_fid",), ("wkb_geometry",), ("id",), ("name",), ("route",), ("type",)]), ] if __name__ == '__main__': run_sql_checks(sql_checks)
#!/usr/bin/env python from shared.utils.check_imported_data import ( run_sql_checks, assert_count_zero, assert_count_minimum, ) sql_checks = [ ("count", "select count(*) from parkeerzones_new", assert_count_minimum(100)), ( "count_uitz", "select count(*) from parkeerzones_uitz_new", assert_count_minimum(60), ), ( "geometrie", """ select count(*) from parkeerzones_new where wkb_geometry is null or ST_GeometryType(wkb_geometry) <> 'ST_Polygon' """, assert_count_zero(), ), ( "geometrie", """ select count(*) from parkeerzones_uitz_new where wkb_geometry is null or ST_GeometryType(wkb_geometry) <> 'ST_Polygon' """, assert_count_zero(), ),
#!/usr/bin/env python from shared.utils.check_imported_data import run_sql_checks, assert_count_minimum, assert_count_zero sql_checks = [ ('count', "select count(*) from vezips_new", assert_count_minimum(75)), ('columns', """ select column_name from information_schema.columns where table_schema = 'public' and table_name = 'vezips_new' """, lambda x: x == [('ogc_fid',), ('wkb_geometry',), ('soortcode',), ('vezip_nummer',), ('vezip_type',), ('standplaats',), ('jaar_aanleg',), ('venstertijden',), ('toegangssysteem',), ('camera',),('beheerorganisatie',), ('bijzonderheden',)]), ('geometrie', """ select count(*) from vezips_new where wkb_geometry is null or ST_IsValid(wkb_geometry) = false or ST_GeometryType(wkb_geometry) <> 'ST_Point' """, assert_count_zero()), ] if __name__ == '__main__': run_sql_checks(sql_checks)
#!/usr/bin/env python from shared.utils.check_imported_data import run_sql_checks, assert_count_minimum, assert_count_zero sql_checks = [ ('count', "select count(*) from bekendmakingen_new", assert_count_minimum(1000)), ('columns', """ select column_name from information_schema.columns where table_schema = 'public' and table_name = 'bekendmakingen_new' """, lambda x: x == [('ogc_fid', ), ('wkb_geometry', ), ('id', ), ('oid_', ), ('categorie', ), ('onderwerp', ), ('titel', ), ('beschrijving', ), ('url', ), ('postcodehuisnummer', ), ('plaats', ), ('straat', ), ('datum', ), ('overheid', )]), ('geometrie', """ select count(*) from bekendmakingen_new where wkb_geometry is null or ST_IsValid(wkb_geometry) = false or ST_GeometryType(wkb_geometry) <> 'ST_Point' """, assert_count_zero()), ] if __name__ == '__main__': run_sql_checks(sql_checks)
#!/usr/bin/env python from shared.utils.check_imported_data import run_sql_checks, assert_count_zero, assert_count_minimum sql_checks = [ ('count', "select count(*) from hoofdroutes_new", assert_count_minimum(3)), ('geometrie', """ select count(*) from hoofdroutes_new where wkb_geometry is null or ST_IsValid(wkb_geometry) = false or ST_GeometryType(wkb_geometry) <> 'ST_MultiLineString' """, assert_count_zero()), ('columns', """ select column_name from information_schema.columns where table_schema = 'public' and table_name = 'hoofdroutes_new' """, lambda x: x == [("ogc_fid", ), ("wkb_geometry", ), ("id", ), ("name", ), ("route", ), ("type", )]), ] if __name__ == '__main__': run_sql_checks(sql_checks)
#!/usr/bin/env python from shared.utils.check_imported_data import ( run_sql_checks, all_valid_url, assert_count_minimum, assert_count_zero, ) sql_checks = [ ("count", "select count(*) from biz_view_new", assert_count_minimum(48)), ( "columns", """ select column_name from information_schema.columns where table_schema = 'public' and table_name = 'biz_data_new' """, lambda x: x == [ ("biz_id", ), ("naam", ), ("biz_type", ), ("heffingsgrondslag", ), ("website", ), ("heffing", ), ("bijdrageplichtigen", ), ("verordening", ), ("wkb_geometry", ), ], ), ( "website", "select website from biz_view_new where website is not NULL",
#!/usr/bin/env python from shared.utils.check_imported_data import ( run_sql_checks, assert_count_minimum, ) sql_checks = [ ("count", "select count(*) from corona_handhaving_new", assert_count_minimum(30)), ( "columns", """ select count(column_name) from information_schema.columns where table_schema = 'public' and table_name = 'corona_handhaving_new' and column_name in ( 'id', 'organisatie', 'type_interventie', 'week_nummer', 'jaar', 'aantal' ) """, assert_count_minimum(5), ), ] if __name__ == "__main__": run_sql_checks(sql_checks)
#!/usr/bin/env python from shared.utils.check_imported_data import ( run_sql_checks, assert_count_minimum, ) sql_checks = [ ("count", "select count(*) from corona_handhaving_new", assert_count_minimum(30)), ( "columns", """ select count(column_name) from information_schema.columns where table_schema = 'public' and table_name = 'corona_handhaving_new' and column_name in ('id', 'organisatie', 'type_interventie', 'aantal', 'week_nummer') """, assert_count_minimum(5), ), ] if __name__ == "__main__": run_sql_checks(sql_checks)
#!/usr/bin/env python from shared.utils.check_imported_data import run_sql_checks, all_valid_url, assert_count_minimum, assert_count_zero sql_checks = [ ('count1', "select count(*) from buurten_new", assert_count_minimum(475)), ('kolom1', """ select count(column_name) from information_schema.columns where table_schema = 'public' and table_name = 'buurten_new' and column_name in ('bu_naam', 'legenda', 'kookgas', 'wkb_geometry') """, assert_count_minimum(4)), ('geometrie1', """ select count(*) from buurten_new where wkb_geometry is null or ST_IsValid(wkb_geometry) = false or ST_GeometryType(wkb_geometry) <> 'ST_MultiPolygon' """, assert_count_zero()), ('count2', "select count(*) from buurtinitiatieven_new", assert_count_minimum(50)), ('kolom2', """ select count(column_name) from information_schema.columns where table_schema = 'public' and table_name = 'buurtinitiatieven_new' and column_name in ('bu_naam', 'buurtiniti', 'wkb_geometry') """, assert_count_minimum(3)), ('geometrie2', """ select count(*) from buurtinitiatieven_new where wkb_geometry is null or ST_IsValid(wkb_geometry) = false or ST_GeometryType(wkb_geometry) <> 'ST_Point' """, assert_count_zero()), ] if __name__ == '__main__': run_sql_checks(sql_checks)