Sample_mflix vs mflix

Using atlas and importing the sample data, you get the database sample_mflix added instead of mflix. After setting up the project for M220J and running the test cases, I found that I did have a flix database (not sure if it really was there from the beginning or was added), though it only has collections for comments, sessions, and users. It is missing movies and theaters that are in the sample_mflix database.

I can update the test cases for chapter one so they pass. Is that really the correct action, or is there a better dataset to import. I have seen some posts about migration, though when I look in the mflix-java folder, (also on github), there is no script file. I am not sure if there was and it was removed.

I can run the project, and it “seems” okay. Is this as expected? Just checking my understanding before continuing!

Thank you, KL

1 Like

Hi @Ken_Lee1,

I will suggest you delete all the database and collection and re-load the sample dataset in your atlas cluster, so all the missing collection will be restored.

There are several ways to delete the existing dataset.

A simple one will be using the Atlas Cloud Cluster.
There is a small delete icon beside the database name, you can click it to drop the databases one by one.

Second way is by using the db.dropDatabase() method:

use <database_name>
db.dropDatabase()

References:

Load sample data to your cluster

Thanks,
Kushagra

@Kushagra_Kesav ,

I followed the first way. I removed all of the databases from the cluster. After pressing the ellipsis and choosing the load sample data, it ran for a period of time, and gave the following message: An error occurred loading sample data: Target cluster does not have enough free space to import dataset.

Is there another step to shrink or resize the space available in the cluster? When I went into compass to look at what database and collections were left, I did see admin, config and local. Under local, oplog.rs was still 15.6 GB in size. Does this need to get pruned (not sure of the right word?)

Thank you, KL

Hi @Ken_Lee1,

You only get 500MB of space in the free atlas tier cluster. The sample dataset acquires 350 MB of the space so, you have to first delete all the databases and then re-load the sample again.

Hope it helps,

Thanks,
Kushagra

@Kushagra_Kesav

I dropped the cluster, and created a new one. I imported the sample data set from the ellipses. This has the following databases:
admin
config
local
sample_airbnb
sample_analytics
sample_geospatial
sample_mflix
sample_restaurants
sample_supplies
sample_training
sample_weatherdata

I don’t see an “mflix” database and there were no errors creating the sample dataset. Several of the MongoClientLesson test cases will still fail. Is there another step that creates the mflix database that I am missing in the lesson steps?

Thanks, KL

Hi @Ken_Lee1,

Sample_mflix database == mflix database

Let us know if you need any other help.!!

Thanks,
Kushagra

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.