Use yaml to create hierarchy configs using scala