Five Stars

tMongoDBOutput include two array types in collection

Hi,

 

I am working with mongodb. My collection has 2 array fields. In both array I will have some values. In tmongooutput, I have successfully created one array field which is grouped by a primary key. But I am not able to set the other array field. I noticed that I can only set one element as loop element at a time.  Input is csv.

 

Can anyone please give a solution how to create a collection which has 2 array fields? any way to set 2 loop elements?

 

Thanks in advance.

 

Ravinder

2 REPLIES
Moderator

Re: tMongoDBOutput include two array types in collection

Hello,

Could you please elaborate your case with an example with input and expected output values?

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.
Five Stars

Re: tMongoDBOutput include two array types in collection

Hi,

 

I have calculated daily ratings for some shows. Now I have to create a collection where I have show name as group column, daily ratings and weekly ratings will be stored in an array. So if we take just week 27, we will have one record for each show and it will have daily ratings as an array with (7 elements) and weekly ratings array (1 element). I am able to create collection with either weekly ratings array or daily ratings array, but not both at once.

 

Workaround: I have solved the problem but it takes intermediate steps. I create 2 collections for daily and weekly and then join them on show_name.

 

If there is any better solution please suggest.

 

Thanks

Ravinder