Forum Discussion
Renaming columns in PQ : We expected a RenameOperations value
Hi Anonymous ,
It doesn't look as though your final Rename step is providing the arguments as required by the function.
Per MS Docs:
It doesn't appear as though you've provided a list of {"nameFrom", "nameTo"} pairs. I can't really tell from the code exactly what your Navigation step is resolving to, but I'm guessing it's not a compatible list format for this function.
Also, FWIW, the thing you did with the Dataflow/DataFlow steps with the change in capitalisation to keep the same word is pretty bad form. Try to use more unique names to assist with future reading/debugging. 🙂
Pete
Thanks, BA_Pete ,
Navigation step outcome as follows:
So per MS documentation : "A replacement operation renames consists of a list of two values, the old column name and new column name, provided in a list."
So still do not get where the issue resides..
- BA_Pete4 years agoSuper User
Fair enough, looks fine.
The only thing I can think that might cause this particular error would be if your list pairs were not all being formed correctly, i.e. if one of the pair values evaluated to null/integer/special character somehow.
Have you tried clicking on every one of your nested lists in your Navigation step to ensure that each one includes two valid values?
Another issue sometimes occurs when you have more pair values in your lists than columns in the table (or the old names don't match), but I don't think that would throw this error.
Pete
- vhatp2 years agoAdvocate I
I was getting this error as long as my renames list contained null within some of the pairs, e.g. {"oldNameX",null}. As this was a consequence of List.Zipping two lists of uneqal lenghts, the solution was to trim the lists to same size. After, the error was gone - even though the renames list was in fact shorter than the count of columns to be renamed. The rest simply stayed unrenamed, without any error.