zoukankan      html  css  js  c++  java
  • mongodb数据库shell

    mongoexport -d mofangdb -c log_user_access_index   --type=csv -f _id,uid,page,date -o log_user_access_index.csv
    
    
    mongoexport -d comb -c vcf_file_base_info  -q '{"version":"v2"}' --type=csv -f  batch  -o v2batch.csv  --host  X.X.X.X  --port 27017
    
    
    
    mongoexport -d comb -c vcf_file_base_info  -q '{"version":"v2.1"}' --type=csv -f  batch  -o v2_1batch.csv  --host  X.X.X.X --port 27017
    
    mongoexport -d comb -c vcf_file_base_info -o ./vcf_file_base_info.json --host  X.X.X.X  --port 27017
    
    mongoexport -d comb -c vcf_file_base_info -o ./vcf_file_base_info.json --host  X.X.X.X --port 27017
    
    
    
    
    
    mongoexport -d comb -c sample -o ./sample.json --host  X.X.X.X  --port 27017
    
    
    
    mongoimport -d comb -c gen_positions --file /tmp/all_index.txt --host  X.X.X.X  --port 27017
    
    
    
    p=json.load(open('/tmp/index.json'))
    f=open('/tmp/a1.txt','w')
    for ix in p:
        f.write(' '.join([ix['chromosome'],ix['position'],ix['ref'],ix['alt']])+'
    ')
    f.close()
    
    
    
    mongoexport -d comb -c vcf_file_base_info -o ./vcf_file_base_info_new.json --host  X.X.X.X --port 27017
    mongoexport -d comb -c sample -o ./sample_new.json --host  X.X.X.X  --port 27017
    mongoimport -d comb -c gen_positions --file /tmp/gen_positions_new.txt --host  X.X.X.X  --port 27017
    
    
    db.getCollection('vcf_file_base_info').update({"version":"v1"},{"$set":{"vcf_s3_clean_path":null,"sample_s3_clean_path":null,"snp_s3_clean_path":null}},{"multi":1})
    db.getCollection('vcf_file_base_info').find({"created":{$gte:ISODate("2018-12-10 00:00:01")},"vcf_s3_clean_path":{$ne:null}})
    db.getCollection('vcf_file_base_info').update({"created":{$gte:ISODate("2018-12-10 00:00:01")},"vcf_s3_clean_path":{$ne:null}} ,{"$set":{"vcf_s3_clean_path":null,"sample_s3_clean_path":null,"snp_s3_clean_path":null}},{"multi":1})
  • 相关阅读:
    【PHP设计模式 08_CeLue.php】策略模式
    【PHP设计模式 07_ZeRenLian.php】责任链模式
    【PHP设计模式 06_GuanChaZhe.php】观察者模式
    【PHP设计模式 05_DanLi.php】单例模式
    【PHP设计模式 04_GongChang.php】 工厂方法
    【PHP设计模式 03_JianDanGongChang.php】 简单工厂
    【PHP设计模式 02_JieKou.php】面向接口开发
    区块链学习-开始
    erc721-165学习
    cryptopunks的代码解释
  • 原文地址:https://www.cnblogs.com/similarface/p/9857081.html
Copyright © 2011-2022 走看看