joaoftrodrigues / atpdb-cleanup-and-conversion-to-relational

0 stars 0 forks source link

Geral: Verify empty values, all fields #16

Open inescelorico opened 1 year ago

inescelorico commented 1 year ago

Verify empty values ("") , all fields

db.atpplayers.find({"_id":"-"}).count() db.atpplayers.find({"PlayerName":"-"}).count() db.atpplayers.find({"Born":"-"}).count() 320752 db.atpplayers.find({"Hand":"-"}).count() db.atpplayers.find({"LinkPlayer":"-"}).count() db.atpplayers.find({"Tournament":"-"}).count() db.atpplayers.find({"Location":"-"}).count() db.atpplayers.find({"Date":"-"}).count() db.atpplayers.find({"Ground":"-"}).count()191 db.atpplayers.find({"Prize":"-"}).count() 19136 db.atpplayers.find({"GameRound":"-"}).count() db.atpplayers.find({"Oponent":"-"}).count() 7 db.atpplayers.find({"WL":"-"}).count()19257 db.atpplayers.find({"GameRank":"-"}).count()19236 db.atpplayers.find({"Score":"-"}).count() 161 db.atpplayers.find({"Height":"-"}).count()

inescelorico commented 1 year ago

Solution --> Turn into null

db.atpplayers.updateMany({"Born":""},{$set:{"Born":null}}) db.atpplayers.updateMany({"Ground":""},{$set:{"Ground":null}}) db.atpplayers.updateMany({"Prize":""},{$set:{"Prize":null}}) db.atpplayers.updateMany({"WL":""},{$set:{"WL":null}}) db.atpplayers.updateMany({"GameRank":""},{$set:{"GameRank":null}}) db.atpplayers.updateMany({"Score":""},{$set:{"Score":null}})