Options

De-Pivot and Value Types

GzFGzF Member Posts: 11 Contributor II
edited November 2018 in Help
Hi guys,

I'm working with the De-Pivot operator  to transform some data, currently in one line to different lines.
Just up front, I'm working with 5.3.015 open scource.
The original data looks like:
ID Value_Month1 Value_Month2
1 123 124
2 133 135
The data in Value_Month1 is of the "real" type and the data Value_Month2 is a "numeric" attribute.
I use De-Pivot to transform it into
ID Time Value
1 1 123
1 2 124
2 1 133
2 2 135

An error message is delivered quoting that the two types are not compatible so de-pivotisation can't be done.
Is it a bug? Maybe it is already fixed, I don't know?

I got a work around using first NumericToNominal and then NominalToNumeric to get  the type of Value_Month1 attribute from "real" to "numeric"
But still I think it is odd that the two types "numeric" and "real" are compatible everywhere else but while using De-Pivot.

And it also arose the question: What are the differences between "real" and "numeric"? Why are both in use?
Haven't found anything in the Manual so far.

Cheers
Garf

Answers

  • Options
    GzFGzF Member Posts: 11 Contributor II
    Sorry to add a comment:

    1. Same problem occures between "real" and "integer"

    2. Is there some kind of NumericToReal or IntegerToNumeric, ... operator? Just found RealToInteger which might not be sufficient for all possible tasks.

    Cheers
    Garf
  • Options
    GzFGzF Member Posts: 11 Contributor II
    Just found a different work around: NumericalToReal and set all Numeric Attributes to the real type
Sign In or Register to comment.