今天我遇到一个问题,当我在expression 节点中使用到不存在的列名时该节点就会无可避免的报错(column expression节点也类似)。也许开发小组一开始的想法是好的,问题是我前一个节点是一个透视结果,我并不能保证会出现哪些列名,我的expression表达式在统计时必须把所有有可能出现的列都写进去,所以造成了一种两难的局面。
我今天尝试过用java snippet或者是python script来解决这个问题,但忙了大半天也没什么进展,最终只能手动创建一个包含所有可能出现的列名的空表然后进行join操作解决了这个问题,当然,这并不优雅。
不知道是不是存在什么办法可以更轻易的解决这个问题?如果没有,我希望开发小组可以针对这种情况做一下优化,非常感谢!
The following is from AI translation:
Today I encountered a problem where when I use a non-existent column name in the expression node, the node will inevitably report an error (similar to the column expression node). Perhaps the initial idea of the development team was good, but the problem is that my previous node was a pivot result, and I cannot guarantee which column names will appear. My expression expression must include all possible columns in the statistics, which creates a dilemma.
I tried using Java snippets or Python scripts to solve this problem today, but I was busy for a long time without much progress. In the end, I had to manually create an empty table containing all possible column names and perform a join operation to solve the problem. Of course, this is not elegant.
I don’t know if there is any way to solve this problem more easily? If not, I hope the development team can optimize for this situation. Thank you very much!