Sample Python Script


from pymongo import MongoClient
client = MongoClient('localhost:27018')

collection = client.ucc_ppt.storage

with open('/home/kolguk01/cfit_ucc_account_new.txt') as f:
    for word in f.readlines():
        collection.delete_many({'account': word.rstrip()})



How to execute it ..

Python name.py

Comments

Popular posts from this blog

Netezza Commands

MS SQL Server Tips