https://github.com/mongodb-developer/data-federation-tutorial
This repo contains some code samples for DevHub blog posts.
https://github.com/mongodb-developer/data-federation-tutorial
Last synced: 5 days ago
JSON representation
This repo contains some code samples for DevHub blog posts.
- Host: GitHub
- URL: https://github.com/mongodb-developer/data-federation-tutorial
- Owner: mongodb-developer
- License: apache-2.0
- Created: 2020-06-05T17:31:36.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-10T13:42:03.000Z (over 2 years ago)
- Last Synced: 2025-04-07T05:35:40.959Z (2 months ago)
- Language: Python
- Size: 8.79 KB
- Stars: 6
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Data Federation Tutorial
This repo contains some code samples for a DevCenter blog post:
- [MongoDB Atlas Data Federation Tutorial: Federated Queries and $out to AWS S3](http://developer.mongodb.com/how-to/atlas-data-lake-federated-queries-out-aws-s3)
# Requirements
- Python 3
- install required libs: `pip3 install -r requirements.txt`# Run
- For `archive.py` and `federated_queries.py` you will need the URI of your federated instance.
- For `insert.py` and `remove.py` you will need your MongoDB Atlas URI.## insert.py
Inserts documents in `test.orders` of the specified MongoDB cluster.
## archive.py
This script uses the new $out stage in order to archive docs from our Atlas cluster to a S3 JSON file.
## remove.py
Removes the documents that we have archived.
## federated_queries.py
This script checks that we can still access 100% of the data using the federated instance.