66 - custom-years (str) : List of years to process when refresh_type is "custom"
77 - drop-tables : Drop all table before ingestion if flag is added
88 - check-update : For edc, only refresh table if source was updated since last refresh
9- - refresh-table (str): Source to refresh ("all", "edc", "commune", "udi ")
9+ - refresh-table (str): Source to refresh ("all", "edc", "commune", "atlasante ")
1010
1111Examples:
1212 - build_database --refresh-table all : refresh all tables
13- - build_database --refresh-table edc : only refresh edc table
14- - build_database --refresh-table commune : only refresh commune table
15- - build_database --refresh-table udi : only refresh udi table
13+ - build_database --refresh-table edc : only refresh edc tables
14+ - build_database --refresh-table commune : only refresh commune tables
15+ - build_database --refresh-table atlasante : only refresh tables from atlasante
1616 - build_database --refresh-type all : Process all years
1717 - build_database --refresh-type last : Process last year only
1818 - build_database --refresh-type custom --custom-years 2018,2024 : Process only the years 2018 and 2024
2828from pipelines .tasks .client .core .duckdb_client import DuckDBClient
2929from pipelines .tasks .client .datagouv_client import DataGouvClient
3030from pipelines .tasks .client .opendatasoft_client import OpenDataSoftClient
31- from pipelines .tasks .client .udi_client import UDIClient
31+ from pipelines .tasks .client .uploaded_geojson_client import UploadedGeoJSONClient
3232from pipelines .tasks .config .config_insee import get_insee_config
3333from pipelines .tasks .config .config_laposte import get_laposte_config
34- from pipelines .tasks .config .config_udi import get_udi_config
34+ from pipelines .tasks .config .config_uploaded_geojson import uploaded_geojson_config
3535from pipelines .utils .logger import get_logger
3636
3737logger = get_logger (__name__ )
@@ -48,7 +48,7 @@ def execute(
4848 Execute the EDC dataset processing with specified parameters.
4949
5050 :param refresh_type: Type of refresh to perform ("all", "last", or "custom")
51- :param refresh_table: which table to refresh ("all", "edc","commune", "udi ")
51+ :param refresh_table: which tables to refresh ("all", "edc", "commune", "atlasante ")
5252 :param custom_years: List of years to process when refresh_type is "custom"
5353 :param drop_tables: Whether to drop edc tables in the database before data insertion.
5454 """
@@ -74,8 +74,8 @@ def execute(
7474 laposte .process_datasets ()
7575 opendatasoft = OpenDataSoftClient (duckdb_client )
7676 opendatasoft .process_datasets ()
77- if refresh_table == "all" or refresh_table == "udi " :
78- udi_client = UDIClient ( get_udi_config () , duckdb_client )
79- udi_client .process_datasets ()
77+ if refresh_table == "all" or refresh_table == "atlasante " :
78+ geojson_client = UploadedGeoJSONClient ( uploaded_geojson_config , duckdb_client )
79+ geojson_client .process_datasets ()
8080
8181 duckdb_client .close ()
0 commit comments