Skip to content
Snippets Groups Projects
Commit aef0b0f6 authored by thomaswoehlke's avatar thomaswoehlke
Browse files

Refactoring: vaccination

parent ee2076a3
No related branches found
No related tags found
1 merge request!162Refactoring 2021 05 20 start
...@@ -104,6 +104,10 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase): ...@@ -104,6 +104,10 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
app.logger.info("------------------------------------------------------------") app.logger.info("------------------------------------------------------------")
return self return self
def __clean_bundesland(self):
RkiBundesland.remove_all()
return self
def __full_update_bundesland(self): def __full_update_bundesland(self):
app.logger.info(" RkiServiceUpdateFull.__full_update_bundesland [begin]") app.logger.info(" RkiServiceUpdateFull.__full_update_bundesland [begin]")
app.logger.info("------------------------------------------------------------") app.logger.info("------------------------------------------------------------")
...@@ -131,6 +135,11 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase): ...@@ -131,6 +135,11 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
app.logger.info("------------------------------------------------------------") app.logger.info("------------------------------------------------------------")
return self return self
def __clean_landkreis(self):
RkiLandkreis.remove_all()
self.__clean_bundesland()
return self
def __full_update_landkreis(self): def __full_update_landkreis(self):
RkiLandkreis.remove_all() RkiLandkreis.remove_all()
self.__full_update_bundesland() self.__full_update_bundesland()
...@@ -166,6 +175,10 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase): ...@@ -166,6 +175,10 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
app.logger.info("------------------------------------------------------------") app.logger.info("------------------------------------------------------------")
return self return self
def __clean_data(self):
RkiData.remove_all()
return self
def __full_update_data(self): def __full_update_data(self):
app.logger.info(" RkiServiceUpdateFull.__full_update_data [begin]") app.logger.info(" RkiServiceUpdateFull.__full_update_data [begin]")
app.logger.info("------------------------------------------------------------") app.logger.info("------------------------------------------------------------")
...@@ -244,8 +257,18 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase): ...@@ -244,8 +257,18 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
app.logger.info("------------------------------------------------------------") app.logger.info("------------------------------------------------------------")
return self return self
def __clean_dimension_tables(self):
RkiMeldedatum.remove_all()
RkiDatenstand.remove_all()
RkiRefDatum.remove_all()
RkiAltersgruppe.remove_all()
RkiLandkreis.remove_all()
RkiBundesland.remove_all()
return self
def full_update_dimension_tables(self): def full_update_dimension_tables(self):
RkiData.remove_all() self.__clean_fact_table()
self.__clean_dimension_tables()
self.__full_update_date_reported() self.__full_update_date_reported()
self.__full_update_date_datenstand() self.__full_update_date_datenstand()
self.__full_update_date_ref_datum() self.__full_update_date_ref_datum()
...@@ -253,12 +276,18 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase): ...@@ -253,12 +276,18 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
self.__full_update_landkreis() self.__full_update_landkreis()
return self return self
def full_update_fact_table(self): def __clean_fact_table(self):
RkiData.remove_all() RkiData.remove_all()
return self
def full_update_fact_table(self):
self.__clean_fact_table()
self.__full_update_data() self.__full_update_data()
return self return self
def full_update_star_schema(self): def full_update_star_schema(self):
self.__clean_fact_table()
self.__clean_dimension_tables()
self.full_update_dimension_tables() self.full_update_dimension_tables()
self.full_update_fact_table() self.full_update_fact_table()
return self return self
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment