Change metadata
Hi all, I think this is question with an easy solution. Only, I can't find it..
I have an excel sheet which I want to use every month for reporting. It is output from the finance system. The header has one blank cell (first cell). With change metadata I want to rename the blank to a new description. I used get metadata and transform. No errors there. Now when I connect the new metadata to the change metadata node and run, I get an error that the field "Null" does not exist in input data. Somehow it doesn't understand that the blank header cell should be replaced with the new description. The function NullHeaderCellAction in the Excel node is not work as the cell is not Null.
Hope someone has a solution. Thanks in advance!
-
Simplest solution is probably just to hook the output of the Excel node to a new Transform node.
In the new transform node, you need to create a new Field (named Description) with the contents of the blank field. Then you need to remove the old blank field. The ProcessRecords just copies the records.
Configure Fields
out1 += in1
out1.Description = in1[' ']
out1 -= in1[' ']
ProcessRecords
out1 += in1 -
Dataverse 3.1.6 changed how it handles the subtraction of output metadata from the output metadata specification.
This means that its necessary to reverse the order of the last two statements in the ConfigureFields property script described above, i.e. the ConfigureFields script should now be:
out1 += in1
out1 -= in1[' ']
out1.Description = in1[' ']
This change is described in the Python API Changes section at the end of the Dataverse 3.1.6 release overview article, here:
https://lavastorm.zendesk.com/hc/en-us/articles/115002994593-Dataverse-3-1-6-is-Now-Available
Please sign in to leave a comment.
Comments
2 comments