jeroen / mongolite

Fast and Simple MongoDB Client for R
https://jeroen.github.io/mongolite/
286 stars 65 forks source link

colum has arraylist #92

Closed yueming-Chen closed 6 years ago

yueming-Chen commented 7 years ago

Hello guys! I met a problem that is the array concatall in retrive possible? I call the find and need to retrun the datat to bi system though BI system(power bi) couldn't parse the cloumn with array.

the query result :

id   name   belongs
1    user1   a,b,c,d(array)
2   user2   q,w,e,r(array

could it be:

id   name   belongs
1    user1   a
1    user1   b
1    user1   c
1    user1   d
2   user2   q
2   user2   w
2   user2   e
2   user2   r

I thought that itsn't make a sense because why you noSQL database.But that's not any(maybe few) bi support NoSQL(not convert to relational schema).Any ideas?

jeroen commented 6 years ago

R has great tools for reshaping data, have a look at dplyr. I don't think it makes sense to try and do this automatically in mongolite, because other users may have different preferences.