How to create two or more sequences from a row in Excel file

One Star

How to create two or more sequences from a row in Excel file

Hello,
Everyone please teach me!
What I wanna do is like a following.
The following data exists in Excel I wanna transfer(INPUT).
CUL_CD || 2012_02 || 2012_03 || 2012_04 || ???|| 2013_01 ||
00001 2,000 3,000 2,500 3,000
00002 2,000 2,500 1,000 2,000

The following data are what I wanna create(OUTPUT).
CUL_CD || MONTH || AMOUNT
00001 2012_02 2,000
00001 2012_03 3,000
? ? ?
? ? ?
? ? ?
00002 2012_02 2,000
How can I create this data?
Could you teach me some components that can create?
Thanks!
One Star

Re: How to create two or more sequences from a row in Excel file

Hi
Try to download tUnPivotRow at Exchange.
tUnPivot will change columns into rows.
Regards,
Pedro
One Star

Re: How to create two or more sequences from a row in Excel file

Hi Pedro,
Thank you for your replay.
I wanna use it but I don't know how to using download components.
How can I use this component in Talend Job Designs?
Please help me!
One Star

Re: How to create two or more sequences from a row in Excel file

Hi,
ou can unpack the component in a folder on your local system. After that, in Studio, you click Window -> Preferences, in the pref window you click Talend->Components.
There you specify the folder you unpacked the component in.
Now you should have the new component in your Pallet.
Hope this helps!
Regards,
Arno
One Star

Re: How to create two or more sequences from a row in Excel file

Hi avdbrink,
Thank you for your help.
I have installed this component.
But, I don't know usage of this component in Talend job designer.
How should I do next when I exported main of row to join tUnPivotRow component?
What kind of value should be inserted of Input columns in this component?
Please help me!
Regards,
One Star

Re: How to create two or more sequences from a row in Excel file

Hi
Here is the tested data.
00001;2,000;3,000;2,500
00002;2,200;3,000;1,000

Create job as the following images.
pivot_key and pivot_value must be defined in the schema.
Or you will get errors.
Best regards
Pedro
One Star

Re: How to create two or more sequences from a row in Excel file

Hi pedro,
Thank you for your kindness!
I have tried procedure you teach but it's generated several errors.
Please check attached image with error message.
and does anyone know this cause or my mistake? ]
Regards,
One Star

Re: How to create two or more sequences from a row in Excel file

Hi
Which version of TOS do you use?
First, change the type of pivot_value into Integer.
Then click "Code" tag and check the Java code of your job.
Or email me and attach your job.
Regards,
Pedro
One Star

Re: How to create two or more sequences from a row in Excel file

Hi Pedro,
My TOS version is 4.2.3 for Win32.
This Job can't export due to error of compiling.
and I couldn't choose pivot_key and pivot_value in schema.
How should I do next?
Regards,
One Star

Re: How to create two or more sequences from a row in Excel file

Hi
This must be a compatibility issue.
Because i can run this component correctly with JDK1.6.0_11(Win XPSP3).
But when it comes to JDK1.6.0_29(WIN7 32bit), it fails.
Now i try to test it in Linux.
I will update this component in my spare time.
Regards,
Pedro
One Star

Re: How to create two or more sequences from a row in Excel file

Hi,
Thank you for your response.
Is this problem about version of JDK?
Incidentally, my environment is for XP.
Regards,
One Star

Re: How to create two or more sequences from a row in Excel file

Hi
I feel confused this time. Because i change the JDK and JRE version into 1.6.0_11.
But these errors still occur.
Best regards,
Pedro
One Star

Re: How to create two or more sequences from a row in Excel file

Hi
In a word,
It couldn't run on Windows?
Regards,
One Star

Re: How to create two or more sequences from a row in Excel file

Hi
I am having issues with tUnPivotRow component.
Its not showing up in my pallet. I am using TOS 5.2.1
Can any one suggest me a solution.
Thanks
RS