1 00:00:02,100 --> 00:00:04,580 Now to get started with the aggregation pipeline, 2 00:00:04,580 --> 00:00:08,590 we need some data and I will use our persons data again, 3 00:00:08,660 --> 00:00:11,290 you'll find it attached to this video one more time. 4 00:00:11,640 --> 00:00:17,840 We'll import it with mongo import and you should make sure that you run this command in the folder where 5 00:00:17,840 --> 00:00:22,460 you store your persons.json file so that you can simply enter the file name and you're good to go 6 00:00:23,330 --> 00:00:27,270 and then I'll store it in a database which I'll name analytics, 7 00:00:27,350 --> 00:00:28,810 the name is of course up to you 8 00:00:28,910 --> 00:00:31,840 and then a collection which I'll name persons. 9 00:00:32,090 --> 00:00:39,260 I will also add the json array flag here, that is required because the persons.json file has an array 10 00:00:39,350 --> 00:00:46,490 of documents. With that, I can now hit enter and this should import 5000 documents into the database. 11 00:00:46,490 --> 00:00:49,970 Now let's connect to the database with our shell 12 00:00:50,210 --> 00:00:56,370 and there, let's use our analytics database where we should see our persons collection. 13 00:00:56,570 --> 00:01:00,970 Now just to bring this back in memory, a person looks like this, 14 00:01:01,040 --> 00:01:07,220 we get quite a lot of data on a person including things like some dummy location and this is all random 15 00:01:07,220 --> 00:01:09,180 data, just to stress this again, 16 00:01:09,200 --> 00:01:15,420 so some dummy location, the age and some other data as you can see here. 17 00:01:15,620 --> 00:01:18,800 Now let's see how we can use the aggregate framework on this.