0Pricing
MongoDB Academy · 강의

Atlas Data Federation이란 무엇인가요?

학습자는 Data Federation 아키텍처와 지원되는 데이터 원본 유형, 그리고 이를 통합하는 쿼리 엔진을 설명합니다.

Atlas Data Federation이란 무엇인가요?은(는) CoddyKit의 무료 MongoDB Academy 강의입니다. 이것은 4개 중 1번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 MongoDB Academy 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. MongoDB Academy 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

The Problem: Data Lives Everywhere

Modern applications generate data across multiple systems: live operational data in MongoDB Atlas, historical archives in Amazon S3, and analytics exports in data lakes. Querying across these silos traditionally requires data pipelines, ETL jobs, and separate query engines. Atlas Data Federation solves this by letting you query all these sources with a single MongoDB connection and the familiar aggregation pipeline.

What Is Atlas Data Federation?

Atlas Data Federation is a fully managed query engine built into MongoDB Atlas. It creates a federated database instance — a virtual MongoDB deployment that maps data from multiple sources (Atlas clusters, S3 buckets, Atlas Data Lake, HTTP endpoints) to virtual collections. You connect with a standard MongoDB connection string and use the same aggregation pipeline you already know.

// Connect to a federated database instance
// The URI looks like a regular Atlas connection string
// mongodb://...@data.mongodb-api.com/federated
const client = new MongoClient(
  'mongodb+srv://federated-instance.mongodb.net/myFederatedDB'
)

Supported Data Sources

Atlas Data Federation can query: Atlas clusters — live MongoDB collections. Amazon S3 — JSON, BSON, CSV, TSV, Avro, ORC, and Parquet files stored in S3 buckets. Atlas Data Lake — processed and enriched datasets. HTTP/HTTPS endpoints — external REST APIs that return JSON. All sources are mapped to virtual namespaces within the federated instance.

The Federated Database Architecture

A federated database has three layers: Storage configuration — defines which sources map to which virtual databases and collections. Query engine — the distributed SQL/MQL processor that reads from multiple sources, applies pipeline stages, and merges results. Connection layer — a mongos-compatible endpoint you connect to with any MongoDB driver or mongosh.

// Storage configuration (simplified JSON structure)
{
  'databases': [{
    'name': 'analytics',
    'collections': [{
      'name': 'orders_archive',
      'dataSources': [{
        'storeName': 's3Store',
        'path': '/data/orders/2024/'
      }]
    }]
  }]
}

Creating a Federated Database Instance

You create a federated database instance through the Atlas UI, Atlas Admin API, or Atlas CLI. During setup you: 1) Name the instance. 2) Add stores (S3 buckets with IAM credentials, Atlas clusters, etc.). 3) Define virtual databases and collections that point to those stores. 4) Copy the connection string and connect with your MongoDB driver.

// Using Atlas CLI to create a data federation instance
// atlas dataFederation create myFederation --region US_EAST_1

// Then add a store via Atlas UI or API
// POST /api/atlas/v1.0/groups/{groupId}/dataFederation/{name}/dataStores
// { 'name': 's3Store', 'provider': 'S3', 'region': 'us-east-1', 'bucket': 'my-data' }

Virtual Namespaces: Collections Without Schemas

Virtual collections in a federated database do not store data — they are logical views over the underlying source files or collections. You can query a virtual collection named analytics.orders that actually reads S3 Parquet files at s3://my-bucket/orders/2024/. To MongoDB drivers and tools, the virtual collection looks and behaves like a regular MongoDB collection.

// Query a virtual collection backed by S3 files
const ordersArchive = db.collection('orders_archive')
const result = await ordersArchive.aggregate([
  { $match: { year: 2024, region: 'EU' } },
  { $group: { _id: '$category', total: { $sum: '$revenue' } } },
  { $sort: { total: -1 } }
]).toArray()

Cross-Source Joins With $lookup

One of the most powerful features is joining a live Atlas collection with archived S3 data in a single pipeline. For example: look up active customer details from a live Atlas cluster and join them with their 3-year purchase history stored in S3 Parquet files — all in one aggregation with no ETL job required.

// Join live Atlas collection with S3 archive
db.customers.aggregate([
  { $match: { tier: 'platinum' } },      // live Atlas
  { $lookup: {
    from: 'orders_archive',               // virtual S3-backed collection
    localField: '_id',
    foreignField: 'customerId',
    as: 'purchaseHistory'
  }},
  { $project: { name: 1, tier: 1,
    totalOrders: { $size: '$purchaseHistory' } } }
])

File Format Support in S3

Data Federation reads S3 files in many formats: JSON (one document per line or array), BSON (MongoDB native binary), CSV/TSV (with header row), Avro, ORC, and Parquet (columnar formats widely used in data lakes). For columnar formats, Data Federation can push projection and filter predicates into the file reader for even faster scans.

// In storage config, specify file format per path
{
  'dataSources': [{
    'storeName': 's3Store',
    'path': '/analytics/events/{year string}/{month string}/',
    'defaultFormat': '.parquet'
  }]
}

Cost Model: Query-Based Pricing

Atlas Data Federation charges based on data processed (bytes scanned), not uptime. This makes it cost-effective for infrequent analytical queries over large S3 archives — you pay nothing when no queries run. However, scanning entire unpartitioned S3 datasets can become expensive. Partitioning your S3 data and using projection to reduce scanned bytes are critical for cost control.

Security: Auth and Network

Federated database instances use the same Atlas database users and roles as regular Atlas clusters. You can apply Atlas network peering, private endpoints (AWS PrivateLink), and IP Access Lists to restrict who can connect. The connection to S3 uses IAM roles rather than storing AWS keys directly, following AWS security best practices.

When to Use Atlas Data Federation

Data Federation is a good fit when: 1) You need to run ad-hoc queries across historical S3 archives without loading data into a live cluster. 2) You want to join live transactional data with archived data in a single query. 3) You need a unified analytics interface across multiple Atlas clusters. 4) You want to avoid building and maintaining a separate ETL pipeline for each analytical use case.

Quick Check

Test your understanding of MongoDB & NoSQL Databases concepts from this lesson.

Lesson Recap

In this lesson you learned: Atlas Data Federation creates a virtual MongoDB namespace over S3, Atlas clusters, and other sources, you use the standard aggregation pipeline to query and join data across all sources in one operation, and costs are based on bytes scanned, so partitioning and projection are essential for cost control. Next up we map S3 and Atlas sources to virtual namespaces.

자주 묻는 질문

“Atlas Data Federation이란 무엇인가요?” 강의는 무료인가요?

네 — “Atlas Data Federation이란 무엇인가요?” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 MongoDB Academy 강의 전체를 잠금 해제할 수 있습니다. MongoDB Academy 강의에는 총 4개의 강의가 포함되어 있습니다.

“Atlas Data Federation이란 무엇인가요?”에서 뭘 배우나요?

학습자는 Data Federation 아키텍처와 지원되는 데이터 원본 유형, 그리고 이를 통합하는 쿼리 엔진을 설명합니다. 브라우저에서 직접 실행하는 실습 코드로 MongoDB Academy을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

MongoDB Academy을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 MongoDB Academy은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 1번째 강의입니다.

“Atlas Data Federation이란 무엇인가요?” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 MongoDB Academy 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 MongoDB Academy 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. Atlas Data Federation이란 무엇인가요?
  2. S3 및 Atlas 원본을 가상 네임스페이스에 매핑하기
  3. 여러 원본에 걸친 집계 파이프라인 실행하기
  4. 쿼리 성능을 위한 S3 데이터 파티셔닝
← MongoDB Academy(으)로 돌아가기