Commit e7dc4314 authored by mouadh's avatar mouadh

change logique

parent 459bc34b
...@@ -155,9 +155,10 @@ class MdxEngine: ...@@ -155,9 +155,10 @@ class MdxEngine:
config_file_parser = ConfigParser(self.cube_path) config_file_parser = ConfigParser(self.cube_path)
tables = {} tables = {}
if config_file_parser.config_file_exist( if self.client == 'excel' and config_file_parser.config_file_exist(client_type=self.client
) and self.cube in config_file_parser.get_cubes_names( ) and self.cube in config_file_parser.get_cubes_names(client_type=self.client
) and self.client != 'web': ):
# for web (config file) we need only star_schema_dataframes, not all tables
for cubes in config_file_parser.construct_cubes(): for cubes in config_file_parser.construct_cubes():
# TODO working with cubes.source == 'csv' # TODO working with cubes.source == 'csv'
...@@ -176,16 +177,15 @@ class MdxEngine: ...@@ -176,16 +177,15 @@ class MdxEngine:
""":return: all numerical columns in facts table.""" """:return: all numerical columns in facts table."""
# col.lower()[-2:] != 'id' to ignore any id column # col.lower()[-2:] != 'id' to ignore any id column
# if web get measures from config file # if web, get measures from config file
config_file_parser = ConfigParser(self.cube_path) config_file_parser = ConfigParser(self.cube_path)
if self.client == 'web' and config_file_parser.config_file_exist('web'): if self.client == 'web' and config_file_parser.config_file_exist('web'):
for cubes in config_file_parser.construct_cubes(self.client): for cubes in config_file_parser.construct_cubes(self.client):
# TODO temp
# update facts name # update facts name
self.facts = cubes.facts[0].table_name self.facts = cubes.facts[0].table_name
# if measures are specified in the config file
if cubes.facts[0].measures: if cubes.facts[0].measures:
return cubes.facts[0].measures return cubes.facts[0].measures
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment