Closed ulemanstreaming closed 9 years ago
Its asking for the name of the attribute specified as an rstring. The attribute type itself does not need to be an rstring.
I think I misunderstood. Apparently, I have to specify the NAME of an attribute as an rstring. So that means param rootattribute : "values" ; and not param rootattribute : values ; (where values is an attribute of the input schema that happens to be a tuple.) In a standard-toolkit operator, I would expect the latter formulation.
So, apparently the parameter mode is expression
Sorry Rohit, I had stepped away while editing a comment; didn't notice your response. In any case I came to the right realization. Now I just wonder why it is that way.
SPL Java operators don't currently support specifying of attribute types.
Ah yes. I was afraid that might be the case. I was trying to find documentation to that effect but chose the lazy way and asked you instead. Thanks.
It seems the attribute types for rootattribute (TupleToJSON) and probably targetattribute (JSONToTuple) are specified wrong. At least in TupleToJSON (haven't tried the other yet), I am unable to specify a tuple-type attribute containing the structure to be converted; it's looking for an rstring ("CDISP0048E The rootAttribute operator parameter requires values of the rstring type, but values of the tuple<int32 load,int32 disp,int32 temp,int32 hum,int32 vib,int32 x1,int32 x2,int32 x3> type are specified.")
By default, it looks at the whole tuple. If you specify an attribute, I would think that the attribute should be a tuple or a collection. Requiring an rstring does not make sense to me.