Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Reims
Contributor
Contributor

Generate 1 row from multiple rows Talend

i have fields like this

|sector|EmployeeNr|Name|Reason|startTime|EndTime|

with this kind of sample data

 

|Marketing|1|Holydays|Henri|2019-10-03T07:00:00.000Z|2019-10-03T15:00:00.000Z|
|Marketing|1|Holydays|Henri|2019-10-04T07:00:00.000Z|2019-10-


To see the whole post, download it here
Labels (3)
8 Replies
Anonymous
Not applicable

Hi
I think tAggregateRow component can meet your needs, please read the component documentation and learn this component, let me know if you have any questions.

Regards
Shong
Anonymous
Not applicable

Hi
I think tAggregateRow component can meet your needs, please read the component documentation and learn this component, let me know if you have any questions.

Regards
Shong
Reims
Contributor
Contributor
Author

Hi Shong,

 

Thanks for your answer. yes i read a little bit about this component, and it almost works.

 

The only thing is that it is not considering the consecutive days, so i m tryin to add one condition.

 

for example if paul has holydays from 02.06.2019 to 10.06.2019 and then from 15.09.2019 to 20.09.2019

 

By grouping on EmployeeNr, Reason and applying the min function on the start time and max function on the end time,

 

The result will be like Paul had holydays from 02.06.2019 to 20.09.2019.

 

BR

Reims

Reims
Contributor
Contributor
Author

Hi Shong,

 

Thanks for your answer. yes i read a little bit about this component, and it almost works.

 

The only thing is that it is not considering the consecutive days, so i m tryin to add one condition.

 

for example if paul has holydays from 02.06.2019 to 10.06.2019 and then from 15.09.2019 to 20.09.2019

 

By grouping on EmployeeNr, Reason and applying the min function on the start time and max function on the end time,

 

The result will be like Paul had holydays from 02.06.2019 to 20.09.2019.

 

BR

Reims

JohnRMK
Creator II
Creator II

Hello,

You can group by name and number,

For the dates, I advise you to use the tAggregateRow component again, this time with the min and max function. so you will have the start and end date of your holiday

JohnRMK
Creator II
Creator II

Hello,

You can group by name and number,

For the dates, I advise you to use the tAggregateRow component again, this time with the min and max function. so you will have the start and end date of your holiday

Reims
Contributor
Contributor
Author

Hi John, 

 

Thanks for your answer. As said earlier it almost works.

 

The only thing is that it is not considering the consecutive days, so i m tryin to add one condition.

 

for example if paul has holydays on 02.06.2019, 03.06.2019, 04.06.2019, 05.06.2019, 06.06.2019, 07.06.2019, 08.06.2019, 09.06.2019  10.06.2019 and then

 

on 15.09.2019, 16.09.2019, 17.09.2019, 18.09.2019, 19.09.2019 and 20.09.2019

 

By grouping on EmployeeNr, Reason and applying the min function on the start time and max function on the end time,

 

The result will be like Paul had holydays from 02.06.2019 to 20.09.2019.

 

Or i want to obtain is Paul had holydays from 02.06.2019 to 10.06.2019. an then paul had holydays again from 15.09.2019 to 20.09.2019.

 

BR

Reims

Reims
Contributor
Contributor
Author

Hi John, 

 

Thanks for your answer. As said earlier it almost works.

 

The only thing is that it is not considering the consecutive days, so i m tryin to add one condition.

 

for example if paul has holydays on 02.06.2019, 03.06.2019, 04.06.2019, 05.06.2019, 06.06.2019, 07.06.2019, 08.06.2019, 09.06.2019  10.06.2019 and then

 

on 15.09.2019, 16.09.2019, 17.09.2019, 18.09.2019, 19.09.2019 and 20.09.2019

 

By grouping on EmployeeNr, Reason and applying the min function on the start time and max function on the end time,

 

The result will be like Paul had holydays from 02.06.2019 to 20.09.2019.

 

Or i want to obtain is Paul had holydays from 02.06.2019 to 10.06.2019. an then paul had holydays again from 15.09.2019 to 20.09.2019.

 

BR

Reims