Skip to content

Change default value for element_type_column parameter to ElementType…#1414

Closed
wimgielis wants to merge 1 commit into
cubewise-code:masterfrom
wimgielis:ElementType
Closed

Change default value for element_type_column parameter to ElementType…#1414
wimgielis wants to merge 1 commit into
cubewise-code:masterfrom
wimgielis:ElementType

Conversation

@wimgielis

Copy link
Copy Markdown
Contributor

… instead of Type

tm1.elements.get_elements_dataframe() has a default value of "Type" for element_type_column. tm1.hierarchies.update_or_create_hierarchy_from_dataframe() has a default value of "ElementType" for element_type_column.

This seems to add unnecessary downstream work.

… instead of Type

tm1.elements.get_elements_dataframe() has a default value of "Type" for element_type_column.
tm1.hierarchies.update_or_create_hierarchy_from_dataframe() has a default value of "ElementType" for element_type_column.

This seems to add unnecessary downstream work.
@MariusWirtz

Copy link
Copy Markdown
Collaborator

@wimgielis I hear you.
It would have been the right decision to call it "ElementType" when we initially wrote it.

We can't change the name of the column now, as it wouldn't be backwards compatible and break countless scripts on upgrade.

Any other ideas to avoid the pitfall and the renaming work (for the column name mismatch) when using both functions together?

Perhaps we can make the update_or_create_hierarchy_from_dataframe more lenient to accept Type as the element type column if ElementType isn't provided in the df?
Just thinking loud...

@wimgielis

wimgielis commented Jun 8, 2026 via email

Copy link
Copy Markdown
Contributor Author

@MariusWirtz

Copy link
Copy Markdown
Collaborator

Closed for #1418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants