Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce clear_view arg in write_dataframe #1012

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion TM1py/Services/CellService.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ def write_dataframe(self, cube_name: str, data: 'pd.DataFrame', dimensions: Iter
precision: int = None,
skip_non_updateable: bool = False, measure_dimension_elements: Dict = None,
sum_numeric_duplicates: bool = True, remove_blob: bool = True, allow_spread: bool = False,
**kwargs) -> str:
clear_view: str = None, **kwargs) -> str:
"""
Function expects same shape as `execute_mdx_dataframe` returns.
Column order must match dimensions in the target cube with an additional column for the values.
Expand All @@ -656,6 +656,7 @@ def write_dataframe(self, cube_name: str, data: 'pd.DataFrame', dimensions: Iter
:param sum_numeric_duplicates: Aggregate numerical values for duplicated intersections
:param remove_blob: remove blob file after writing with use_blob=True
:param allow_spread: allow TI process in use_blob or use_ti to use CellPutProportionalSpread on C elements
:param clear_view: name of cube view to clear before writing
:return: changeset or None
"""
if not isinstance(data, pd.DataFrame):
Expand Down Expand Up @@ -684,6 +685,7 @@ def write_dataframe(self, cube_name: str, data: 'pd.DataFrame', dimensions: Iter
skip_non_updateable=skip_non_updateable,
measure_dimension_elements=measure_dimension_elements,
allow_spread=allow_spread,
clear_view=clear_view,
**kwargs)

@manage_transaction_log
Expand Down