Problem with Lab $match : validateLab1(pipeline)

Hi! i composed the pipeline and i had the correct result, but now these are the problems that i have:

in the directory where i i saved the validateLab1.js, i run

> MongoDB Enterprise > load('validateLab1.js')

true

so i save in pipeline the aggregation.

now i run this and it hung up :
validateLab1(pipeline)

nothing happens…

Please help me!

I resolved, i did a mistake.

i run the connection to the cluster in other terminal window.

So now i did this :

in the directory where i saved the validateLab1.js i run the command :

mongo "mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/aggregations?replicaSet=Cluster0-shard-0" --authenticationDatabase admin --ssl -u m121 -p aggregations --norc

then :

load('validateLab1.js')

then i saved the aggregation in var pipeline

at the end

validateLab1(pipeline)

@ Alessandro_65603

Please follow Forum guidelines and do not post answers or code examples here. I have edited your post accordingly. And glad you figured it out. Thanks.

Hi Guys,
Thank you for the guidelines about running Mongo from the same folder where we have saved the handouts.
In the explanation it wasn’t clear
Not everyone is a sysAdmin :wink:

Cheers,
Nico