Create a ephimeral container to query mongo:
- docker run --rm -it --name eph_query_mongo -v ${PWD}:/usr/src/code -w /usr/src/code --network="host" python:3 /bin/bash
- pip install -r requirements.txt
- use a query file
Create a persistent container to query mongo:
- docker run -it --name query_mongo -v ${PWD}:/usr/src/code -w /usr/src/code --network="host" python:3 /bin/bash
- pip install -r requirements.txt (once)
- use a query file
- restar container with: docker start query_mongo -ai
If you want to use conda:
- conda create -n query_mongo pymongo=3.8.0 pandas pytz
- conda activate query_mongo
Query files:
- python query_df_tt_and_df_r.py
- python query_df_tt_and_df_r_between_dates.py (modify dates inside)