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: 
Anonymous
Not applicable

Create dynamic Array and fill with "0" in MongoDB using Talend

Hi everyone, 

 

I'm having some trouble for design a job in Talend using MongoDB components. I have no previous experience in Talend or Mongo technologies.

From source, i need to group data by field FARE and DAY and need create an array with 24 elements (where index in array = hour) to insert each VALUE field in this in this index position specified by HOUR value. This array should be filled with "0" when no record registered in source. I'll show you an example:

 

This is my source data wtih 3 records.

0683p000009MA1u.png

 

This records should be grouped in same array and this job should insert in Mongodb one document with this structure.

0683p000009M9u1.png

 

I've got insert this 3 values into array in mongo, but i'm not sure what strategy or design should to apply for insert values in specific index from this array. I've tried tJavaFlex, tJavaRow, tMap components... with no successful results. Someone could help me with this case??

 

Thanks in advance.

Labels (3)
0 Replies