def load(catalog_name, update=False): """ Load all cubes into a database. """ catalog = get_catalog(catalog_name) for cube_name in fetch_index(catalog): if exists_raw(catalog_name, cube_name): cube_data = load_cube_raw(catalog_name, cube_name) cube = Cube(cube_name, cube_data) log.info("Loading: %s (%s facts)", cube_name, len(cube.facts)) load_cube(cube, update=update)
def loadcube(catalog_name, cube_name): """ Load a single cube into a database. """ cube_data = load_cube_raw(catalog_name, cube_name) cube = Cube(cube_name, cube_data) log.info("Loading: %s (%s facts)", cube_name, len(cube.facts)) load_cube(cube)