Skip to content

Conversation

@Kevin-Dekker
Copy link
Collaborator

A concept to allow simple proportional spreads in case any of the elements (coordinates) is c level and the value to write is numerical when using use_ti or use_blob.

Usage
Specify allow_spread=True and write to one or more c level elements.

Tests
Scripts included in tm1py/Tests, further tests required.

Limitations

  • Does not increment,
  • Speed not compared between allow_spread=True and allow_spread=False.
  • Implementation on use_ti not very clean. Although, it's in the same style as the current code in the write_through_unbound_process function.

CellPutProportionalSpread in TI process is used in case allow_spread=True is specified and one of the elements in the write. Meaning all values will be spread.

Sample test script on PR.
CellPutProportionalSpread in TI process is used in case allow_spread=True is specified and one of the elements in the write. Meaning all values will be spread.

Sample test script on PR.
Simplification was oversimplified and wrong. Sequence is important in the statement. Alternate formulation would be:

if (cube_name.lower().startswith("}elementattributes_") or not increment) "CellPutN" else "CellIncrementN"

But that's less readable than current.
@Kevin-Dekker Kevin-Dekker changed the title Issue/write allow spread Spreading on write with use_blob & use_ti Apr 20, 2023
@MariusWirtz
Copy link
Collaborator

Nice work @Kevin-Dekker

Thank you for your contribution!

@MariusWirtz MariusWirtz merged commit dbc9541 into cubewise-code:master Apr 21, 2023
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