tUnpivotRow (external component by daztop) data type issue

One Star

tUnpivotRow (external component by daztop) data type issue

After checking all unpivot options and components, I went for tUnpivotRow v1.1 from user daztop, which works well for me, many thanks.
Please see a more detailed review by me on the review page on Talend exchange.
I however ran into one issue, that looks like a bug to me: I was able to depivotize string data only. Float or date formated data did not work. I received an error "conversion error string to float" from the component.
Here#s screen shot of the schema configuration of the component and the error message:
      
As a workaround I convert data to / from strings before / after using the component.
I would be interested to know, if there can be a configuration mistake by me, or if this is a bug, that can be potentially fixed.
I use TOS 5.6.2.
Moderator

Re: tUnpivotRow (external component by daztop) data type issue

Hi,
The screenshot of  tUnpivotRow component setting is not uploaded successfully into forum.
If I understand your issue very well, you must keep data type consistence (date-->date, float-->float) when you just unpivot your row through tUnpivotRow component.
If you want to convert data type, please take a look at component tConvertType.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tUnpivotRow (external component by daztop) data type issue

Sorry, second try here is the screenshot of the tUniPivotRow component configuration, that causes the error:

Explanation
I want to unpivotize consumption data of different materials. Up to the consumption data columns I have got several material master data columns, that represent the pivot key. The column labels to be unpivotized are p1, p2, p3,... - each denoting consumption period of time. Data type of consumption data itself is double. To my understanding the data types of the unpivot results should be the following
- pivot_key: string (this is the field where the p1, p2, p3,... end up - each of them of data type string in the input file as well)
- pivot_value: double (as the consumption data of each period end up there)
And this causes the error shown above.
It works, if I declare pivot_value as string as well. I had the same experience with a date data type as well.
My conclusion is, that this unpivot component seems to convert every input value into a string.
Unless I make a mistake, that I would be happy to learn about - to avoid awkward data conversion before and after this component