tPivot

Highlighted
One Star

tPivot

Hi,
I would like to use tPivot, so I' ve downloaded the last version of TOS (Milestone release 2.3.0M1) as I thought this component was in it. Unfortunatly, I was wrong. I found this link: 6525, but I don't know how tu use it, to import it in talend. Sorry if this seems stupid, but I'm a little bit lost with TOS for the moment....
Regards.
Employee

Re: tPivot

Hello,
The tPivotOutputDelimited is currently only available in Perl project as mentioned on this page : http://talendforge.org/components/index.php
It's available in 2.3.0M1.
Regards,
One Star

Re: tPivot

Ok,
I'm sorry, I didn't see it.
Thank you for your quick answer.
Regards.
One Star

Re: tPivot

Hi,
I've a file with 2 columns (answers and questions) like this in input:
name|dupond
name|durand
name|martin
firstname|michel
firstname|robert
firstname|jeanne
sex|M
sex|M
sex|F
I would like to have in output:
name|firstname|sex
dupond|michel|M
durand|robert|M
martin|jeanne|F
Can tPivot be useful to do that? Could you help me and explain to me how to do it?
Thanks a lot.
Regards.
Employee

Re: tPivot

Hi,
tPivotOutputDelimited cannot help you in that case because it requires at least 3 columns :
- a pivot column : one output column for each distinct value
- a group by column : one output row for each distinct value
- an aggregation column
Best regards

Re: tPivot

Hi,
Maybe you?ve got a solution to my issue, it would be very helpful.
1. I execute a query on an Oracle database, and as a result, I get this kind of data:
Id Question Answer
1 Name Juan
2 Name Jean
3 Name John
1 Sex M
2 Sex M
3 Sex F
1 Surgery Yes
2 Surgery No
3 Surgery Yes

2. I want to transform my data like this:
Id Name Surgery Sex
1 Juan Yes M
2 Jean No M
3 John Yes F
3. Finally, with a tMap component, I want to put this data in an Access Database, which is already created:
Medical history Patient
-Id -Id
-Surgery -Name
-Sex
Can you show me the way to do it in Talend and/or give me some advice for the part 2.?
Best regards.
Employee

Re: tPivot

Hi,
Your issue is a use case for tPivotOutputDelimited :
- Pivot column is "Question"
- Group by : "Id"
- Aggregation : "Answer"
- Operator : First or Last
Hope it helps
One Star

Re: tPivot

Hi,
Thanks, I'm gonna try that right now,
I keep you inform
Regards.
One Star

Re: tPivot

Ok, it works, thanks a lot!!
I was doing it in my query in SQL and it worked too, but it was much longer.
Thanks again,
Regards.
Employee

Re: tPivot

Thank you for your support and feedback.
Two Stars

Re: tPivot

Hi rbillerey,
The functionality of tPivotOutputDelimited is excellent, so are there any plans for an "in line" tPivot component that doesn't require an output file?
Cheers,
c0utta
Employee

Re: tPivot

Hi c0utta,
We have just created 2553. Feedback is welcome !
Cheers
One Star

Re: tPivot

Hi all,
I am struggling to use tPivotOutputDelimited.  I am trying to transpose rows to columns from an Oracle file to an Excel file.  I am very new to Talend so any help would be appreciated!  Thanks!

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now