Clever use of aggregate $group in MongoDB

There is a set of data: { "campaign_id": "A", "campaign_name": "A", "subscriber_id": "123" }, { "campaign_id": "A", "campaign_name": "A", "subscriber_id": "123" }, { "campaign_id": "A", "campaign_name": "A", "subscriber_id": "456" } Group according to campaign ID and campaign name, a ...

Posted on Sat, 04 Apr 2020 10:14:04 -0700 by kaveman50

Day066 mongodb easy to use

mongoDB mongoDB,nosql database, which stores values in key value format, is often used to store web data, and is the best choice for crawler data storage. Pre concept: RDBMS: it has clearly defined fields and structured data storage mode. It is the most important database type for data storage. Common RDBMS are ...

Posted on Wed, 01 Apr 2020 15:46:52 -0700 by ckehrer

Encapsulate a logging tool class LogUtil based on NLog+NLog.Mongo

Encapsulates a logging tool class LogUtil based on NLog+NLog.Mongo. The code is relatively simple. It mainly integrates the configuration of mongotorget and FileTarget into the class. At the same time, it uses cache dependency to determine whether to re create the Logger class. The complete code is as follows: using NLog; using NLog.Config; ...

Posted on Wed, 01 Apr 2020 14:15:01 -0700 by yuws

Using pymongo to operate the database

Using pymongo to connect to the database Connect mongodb #!/usr/bin/env python # -*- coding:utf-8 -*- from pymongo import MongoClient conn = MongoClient('192.168.0.113', 27017) db = conn.mydb #Connect to mydb database, if not, it will be created automatically my_set = db.test_set  #Use the test set collection, otherwis ...

Posted on Tue, 31 Mar 2020 12:32:13 -0700 by m@ndio

Spring Boot asynchronous request and asynchronous call

I collated Java advanced materials for free, including Java, Redis, MongoDB, MySQL, Zookeeper, Spring Cloud, Dubbo high concurrency distributed and other tutorials, a total of 30G, which needs to be collected by myself.Portal: https://mp.weixin.qq.com/s/osB-BOl6W-ZLTSttTkqMPQ 1, The use of asynchronous requests in Spring Boot 1. Asynchron ...

Posted on Tue, 17 Mar 2020 01:59:05 -0700 by m00ch0

Redis: data structure and basic commands

Official website documents Redis data type Redis supports five data types: string, hash, list, set and zset(sorted set). String (string) As like as two peas, string is the most basic type of redis. You can understand it as a type that is exactly the same as Memcached, and a key corresponds to a va ...

Posted on Thu, 27 Feb 2020 20:43:18 -0800 by sane993

Verifying the integrity of daily line and minute line data in local vnpy database by jqdata

From (https://www.cnblogs.com/quantzone/p/10135558.html) Verify local data integrity Verifying the integrity of transaction data in local vnpy database by jqdata Landing jqdata import pandas as pd import matplotlib.pyplot as plt import numpy as np import jqdatasdk import talib tel = '12345678900' # ...

Posted on Wed, 26 Feb 2020 23:26:31 -0800 by mitchell

java operates native mongoDB to query conditions

In recent project development, the company used the native mongo for data operation, and found the following native operation methods for a long time 1. Encapsulate ip and port as ServerAddress object              ServerAddress address = new ServerAddress(ip, port);   2. Next, encapsulate the user name, databas ...

Posted on Sun, 26 Jan 2020 10:54:02 -0800 by salmon

Spring Boot Integration - MongoDB Integration 2 (MongoDB Entity Creation and Simple CRUD)

Front of Article About Versions rely on Edition springboot 2.0.8.RELEASE mongodb 4.0.14 This content is just to introduce the most basic use and configuration of mongodb. As a well-known database, it has quite a lot of advanced usage. It will expand to introduce a lot of content. Of cours ...

Posted on Thu, 23 Jan 2020 21:06:36 -0800 by rusty1001

mongodb master-slave configuration

The current test environment is on the same server, and the primary and secondary servers are distinguished by ports *Main service port: 27027 *From service port: 27028 Configuration validation file openssl rand -base64 741 > mongo.key chmod 700 mongo.key # The file needs to be copied to the primary service and the secondary service respe ...

Posted on Fri, 10 Jan 2020 09:20:29 -0800 by cityboy101