Commit 5fddc354 authored by mouadh's avatar mouadh

add columns new name

parent 94488a98
...@@ -34,7 +34,8 @@ def _load_table_config_file(executer_instance, cube_obj): ...@@ -34,7 +34,8 @@ def _load_table_config_file(executer_instance, cube_obj):
for dimension in cube_obj.dimensions: for dimension in cube_obj.dimensions:
if dimension.displayName and dimension.name and dimension.displayName != dimension.name: if dimension.displayName and dimension.name and dimension.displayName != dimension.name:
tables[dimension.displayName] = tables[dimension.name][ tables[dimension.displayName] = tables[dimension.name][
dimension.columns] dimension.columns.keys()]
executer_instance.dimension_display_name.append(dimension.name) executer_instance.dimension_display_name.append(dimension.name)
return tables return tables
......
...@@ -290,15 +290,21 @@ class ConfigParser: ...@@ -290,15 +290,21 @@ class ConfigParser:
]) for xml_facts in tree.xpath('/cubes/cube/facts') ]) for xml_facts in tree.xpath('/cubes/cube/facts')
] ]
# keys = {
# key.text: key.attrib['ref']
# for key in xml_facts.findall('keys/column_name')
# },
dimensions = [ dimensions = [
Dimension( Dimension(
name=xml_dimension.find('name').text, name=xml_dimension.find('name').text,
# column_new_name = [key.attrib['column_new_name'] for key in xml_dimension.findall('name')],
displayName=xml_dimension.find('displayName').text, displayName=xml_dimension.find('displayName').text,
columns=[ columns={
column_name.text column_name.text : None if not column_name.attrib else column_name.attrib['column_new_name']
for column_name in xml_dimension.findall( for column_name in xml_dimension.findall(
'columns/name') 'columns/name')
]) })
for xml_dimension in tree.xpath( for xml_dimension in tree.xpath(
'/cubes/cube/dimensions/dimension') '/cubes/cube/dimensions/dimension')
] ]
......
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