MongoDB column of lists lost when unnest()

When following the data-wrangling-with-mongodb-data blog:

https://blog.exploratory.io/data-wrangling-with-mongodb-data-73b3c3d3b2b8#.5pphy1p5n

on Exploratory Version:2.2.0.1_WIN, using local instance of mongoDB containing Restaurant data

The address.coords column (containing 2-item list of long/ lat coordinates) disappears from table and summary view when running:

unnest(grades, .drop=False)

It’s still working fine for Mac, could be an Windows specific, we’ll look into it.

Hi Henry,
I tried this on Windows but it seems to be working on my end.
One thing I’m suspecting is if the .drop=FALSE option is correctly set or not.
If you are generating unnest() command from the UI, you will need to select FALSE for “Drop other list columns”.


Could you double-check the above option?

Hi Hideaki,

Sorry it’s taken ages to get back to you.
I’ve tried to recreate the ‘problem’ (using v2.3 now) and I think I have confused the unnest() and mutate(=list_extract()) commands by wrongly doing

unnest(address.coord, .drop=False)

(Which rightly drops address.coord.)

Instead, I should have done the following two commands in turn

unnest(grades, .drop=False) mutate(longitude = list_extract(address.coord, position = 1))

Sorry for the mistake and thanks for looking at it nonetheless.

Henry

1 Like

Hi Henry, thank you for the update.
Glad to hear it worked for you!
-Hideaki