Skip to content

Commit

Permalink
Removing hierarchy exist check as unnecessary in unbound TI
Browse files Browse the repository at this point in the history
Removing hierarchy exist check as unnecessary  in unbound TI. Hierarchy validation is verified throughout the script
  • Loading branch information
Mr-SabyasachiBose authored and MariusWirtz committed Nov 1, 2024
1 parent d5a25b3 commit 851f6fd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions TM1py/Services/ElementService.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,10 @@ def _build_unwind_hierarchy_edges_from_blob_process(self, dimension_name: str, h
hierarchyupdate_process.add_variable(name=child_variable, variable_type='String')

# Write the statement for delete component in hierarchy
hierarch_check = f"If( HierarchyExists('{dimension_name}', '{hierarchy_name}') = 1);"
delete_component = f"\rHierarchyElementComponentDelete('{dimension_name}', '{hierarchy_name}', {parent_variable}, {child_variable});"
close_if = '\rEndIf;\r'

# Define Metadata section
metadata_statement = hierarch_check + delete_component + close_if
metadata_statement = delete_component
hierarchyupdate_process.metadata_procedure = metadata_statement
return hierarchyupdate_process

Expand Down

0 comments on commit 851f6fd

Please sign in to comment.