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
We came up with this approximate pattern as a way to generalise some of the country-specific code:
class generic_country(ABC):
def get_source_table(self):
@asset()
def inner():
return self._get_source_table()
return inner
# Must be implemented by the child class
def _get_source_table(self):
pass
class Redland(generic_country):
def _get_source_table(self):
return "Redland"
if __name__ == "__main__":
redland = Redland()
defs = Definitions(
assets=[redland.get_source_table()]
)
The text was updated successfully, but these errors were encountered:
Following a discussion with @yongrenjie @sgreenbury and @andrewphilipsmith.
We came up with this approximate pattern as a way to generalise some of the country-specific code:
The text was updated successfully, but these errors were encountered: