Datastream은 MongoDB 소스에서 변경 이벤트 복제를 지원합니다.
MongoDB는 JSON과 유사한 문서를 사용하는 오픈소스 NoSQL 데이터베이스입니다. 한 문서에 다른 문서가 삽입될 수 있습니다. 문서는 컬렉션에 함께 모이며 MongoDB 데이터베이스는 하나 이상의 문서 컬렉션을 저장합니다.
관계형 SQL 데이터베이스와 같이 행과 열로 이루어진 테이블에 데이터를 저장하는 대신 MongoDB 데이터베이스의 각 레코드는 데이터의 바이너리 표현인 바이너리 JSON (BSON)으로 설명된 문서입니다. 그러면 애플리케이션이 이 데이터를 JSON 형식으로 가져올 수 있습니다.
이 페이지에는 다음 정보가 포함되어 있습니다.
MongoDB 데이터베이스에서 복제할 때 이해해야 하는 주요 용어
소스 MongoDB 데이터베이스에서 가져오는 데이터가 Datastream에서 처리되는 방법
Datastream에서 지원되는 MongoDB 버전 및 에디션
MongoDB를 소스로 사용할 경우의 알려진 제한사항
핵심 용어
다음은 MongoDB 소스로 작업할 때 알아야 하는 주요 용어입니다.
SRV 연결: 도메인 이름 서비스 (DNS) 서비스 레코드 (SRV)에 해당하는 호스트 이름이 있는 연결 문자열입니다. 문자열의 형식은 다음과 같습니다.
복제본 세트: 복제 및 자동 장애 조치를 구현하는 MongoDB 서버 클러스터입니다. 복제본 세트는 중복성과 고가용성을 제공하며 모든 프로덕션 배포의 기반입니다.
샤딩된 클러스터: MongoDB 샤딩된 클러스터는 샤드, mongos, 구성 서버로 구성됩니다. MongoDB는 컬렉션 수준에서 데이터를 샤딩하여 클러스터의 샤드에 컬렉션 데이터를 분산합니다.
mongos: 클라이언트 애플리케이션과 샤딩된 클러스터 간의 인터페이스입니다. mongos는 쿼리 라우터 역할을 하고 샤드에 쓰기 작업을 실행합니다.
컬렉션: MongoDB는 계층 구조로 데이터를 정리합니다. MongoDB 배포에는 하나 이상의 데이터베이스가 포함되며 각 데이터베이스에는 하나 이상의 컬렉션이 포함됩니다. 각 컬렉션에서 MongoDB는 필드와 값 쌍이 포함된 문서로 데이터를 저장합니다. 컬렉션은 관계형 데이터베이스의 테이블과 유사합니다.
동작
소스 MongoDB 데이터베이스는 변경 내역을 사용하여 대상에 변경사항을 복제합니다. 변경 내역을 사용하면 실시간 데이터에 액세스할 수 있으며 복제본 세트와 샤딩된 클러스터에서 지원됩니다.
구성된 경우 포함된 객체의 모든 이전 데이터가 복제됩니다.
지정된 객체의 삽입, 업데이트, 삭제와 같은 모든 변경사항이 복제됩니다.
버전
Datastream은 MongoDB 버전 5.0 이상을 지원합니다.
알려진 제한사항
MongoDB를 소스로 사용할 경우의 알려진 제한사항은 다음과 같습니다.
Datastream API를 사용할 때는 스트림에서 제외할 필드만 지정할 수 있습니다. 필드의 포함 목록을 지정하는 것은 지원되지 않습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Source MongoDB document database\n\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\n\u003cbr /\u003e\n\nDatastream supports replicating change events from a MongoDB source.\nMongoDB is an open source, NoSQL database that uses JSON-like documents. One\ndocument can have other documents embedded in it. The documents are gathered\ntogether in collections, and a MongoDB database stores one or more collections\nof documents.\n\nInstead of storing data in tables of rows and columns like relational SQL\ndatabases, each record in a MongoDB database is a document described in binary\nJSON (BSON), a binary representation of data. Applications can then retrieve\nthis data in JSON format.\n\nThis page contains information about:\n\n- The key terms that you need to understand when replicating from a MongoDB database\n- The behavior of how Datastream handles data that's being pulled from a source MongoDB database\n- The versions and editions of MongoDB that Datastream supports\n- Known limitations for using MongoDB as a source\n\nKey terms\n---------\n\nThe following are the key terms that you need to understand when working with\nMongoDB sources:\n\n- **SRV connection**: a connection string with a hostname that corresponds to a\n domain name service (DNS) service record (SRV). The string has the following\n format:\n\n `mongodb+srv://[username:password@]host[/[defaultauthdb][?options]]`\n\n For more information, see the\n [MongoDB documentation](https://www.mongodb.com/docs/manual/reference/connection-string/#srv-connection-format).\n- **Standard connection string**: the standard format of the MongoDB\n connection URI used to connect to a self-hosted MongoDB standalone deployment,\n replica set, or sharded cluster. The string has the following format:\n\n `mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]`\n\n For more information, see the\n [MongoDB documentation](https://www.mongodb.com/docs/manual/reference/connection-string/#standard-connection-string-format).\n- **Replica set**: a cluster of MongoDB servers that implements replication and\n automated failover. Replica sets provide redundancy and high availability, and\n are the basis for all production deployments.\n\n- **Sharded cluster**: a MongoDB sharded cluster consists of shards, mongos and\n configuration servers. MongoDB shards data at the collection level, distributing\n the collection data across the shards in the cluster.\n\n- **mongos** : the interface between the client applications and the sharded\n cluster. `mongos` act as a query router and write operations to shards.\n\n- **Collection**: MongoDB organizes data in a hierarchical structure. A MongoDB\n deployment contains one or more databases, and each database contains one or\n more collections. In each collection, MongoDB stores data as documents that\n contain field and value pairs. Collections are analogous to tables in\n relational databases.\n\nBehavior\n--------\n\nThe source MongoDB database relies upon change streams to replicate changes to\nthe destination. Change streams let you access real-time data and are supported\nfor replica sets and sharded clusters.\n\n- If configured, all historical data is replicated for included objects.\n- All changes, such as inserts, updates, and deletes from the specified objects are replicated.\n\nVersions\n--------\n\nDatastream supports MongoDB versions later than 5.0.\n\nKnown limitations\n-----------------\n\nKnown limitations for using MongoDB as a source include:\n\n- When using the Datastream API, you can only specify what fields you want to exclude in your stream. Specifying an include list for fields isn't supported.\n- Stream recovery isn't supported.\n\nWhat's next\n-----------\n\n- Learn how to [configure a MongoDB source](/datastream/docs/configure-mongodb) for use with Datastream."]]