quintel/etsource — pull request #888 by antw (2014-11-07 12:01:02+00:00)
Title: Support nested attributes in import:node task

@mariatsagkaraki Notified me that the `import:node` task was incapable of accepting nested attributes, which usually take the form of two words split by a `.`, e.g. "import.gas", "output.electricity".

Dots are not allowed to be used in the names of environment variables (a limitation which comes from the terminal/shell, not from our software), therefore something else needs to be substituted in their place. I propose this patch, which allows you to use a double-underscore in place of the dot:

Instead of

rake import:node NODE=node_key output.electricity=0.2

... run ...

rake import:node NODE=node_key output__electricity=0.2

@jorisberkhout Is this an acceptable solution? Can the VBA script be adapted to replace dots with double-underscores in attribute names before running `rake`?