AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

싱크 커넥터 쓰기 모델 전략

구성 속성을 설정하여 MongoDB Kafka 싱크 connector 가 MongoDB 에 데이터를 쓰는 방법을 지정할 수 있습니다. 다음 섹션에서는 이 동작을 사용자 지정하기 위해 설정할 수 있는 구성 속성에 대해 설명합니다.

writemodel.strategy 구성 속성을 설정하여 싱크 connector 가 싱크 기록을 수신할 때 데이터를 쓰는 방법을 지정합니다.

You can set the value of writemodel.strategy to any of the fully qualified class names of the write model strategies described in the Strategies section of this page. You can specify a strategy by setting the following configuration:

writemodel.strategy=<a write model strategy>

싱크 connector 가 툼스톤 이벤트를 수신할 때 데이터를 쓰는 방법을 지정하려면 delete.writemodel.strategy 구성 속성을 설정합니다. 툼스톤 이벤트는 키가 있지만 값이 없는 레코드로, 삭제된 레코드를 나타냅니다.

You can set the value of delete.writemodel.strategy to any of the fully qualified class names of the write model strategies described in the Strategies section of this page. You can specify a strategy by setting the following configuration:

delete.writemodel.strategy=<a write model strategy>

카테고리별로 정리된 싱크 connector 구성 설정 목록은 싱크 Connector 구성 속성가이드 를 참조하세요.

이름
설명

DefaultWriteModelStrategy

설명:
이 전략은 기본적으로 ReplaceOneDefaultStrategy 을 사용하고, timeseries.timefield 옵션을 설정하면 InsertOneDefaultStrategy 을 사용합니다.

이것은 writemodel.strategy 구성 속성의 기본값입니다.

InsertOneDefaultStrategy

설명:
각 싱크 기록을 문서로 MongoDB에 삽입합니다.
이 전략을 지정하려면 구성 속성을 다음 클래스 이름으로 설정합니다.

com.mongodb.kafka.connect.sink.writemodel.strategy.InsertOneDefaultStrategy

ReplaceOneDefaultStrategy

설명:
_id 필드로 싱크 기록과 일치하는 MongoDB의 문서 최대 하나를 바꾸는 방법입니다. 일치하는 문서가 없는 경우 Connector는 싱크 기록을 새 문서로 삽입합니다.
이 전략을 지정하려면 구성 속성을 다음 클래스 이름으로 설정합니다.

com.mongodb.kafka.connect.sink.writemodel.strategy.ReplaceOneDefaultStrategy

하나의 비즈니스 키 교체 전략

설명:
지정된 비즈니스 키로 sink record와 일치하는 문서 최대 하나를 바꿅니다. 일치하는 문서가 없는 경우 Connector는 싱크 기록을 새 문서로 삽입합니다.
이 전략을 지정하려면 구성 속성을 다음 클래스 이름으로 설정합니다.

com.mongodb.kafka.connect.sink.writemodel.strategy.ReplaceOneBusinessKeyStrategy

이 전략을 사용하는 방법을 보여주는 예를 보려면 쓰기 모델 전략 가이드를 참조하세요.

DeleteOneDefaultStrategy

설명:
문서에 null 값 구조가 포함되어 있는 경우에만 _id 필드로 싱크 커넥터의 키 구조와 일치하는 문서를 최대 하나 삭제합니다.

이것이 delete.writemodel.strategy 구성 속성의 기본값입니다.

delete.on.null.values=true을 설정하면 이 전략이 writemodel.strategy 속성의 기본값으로 설정됩니다.
이 전략을 지정하려면 구성 속성을 다음 클래스 이름으로 설정합니다.

com.mongodb.kafka.connect.sink.writemodel.strategy.DeleteOneDefaultStrategy

하나의 비즈니스 키 삭제 전략

설명:
비즈니스 키를 기준으로 싱크 기록과 일치하는 MongoDB 문서를 최대 1개 삭제합니다. 이 전략에는 키 생성을 위해 valueDoc 이(가) 필요합니다. 키 생성을 위해 PartialKeyStrategy 을(를) 활용하려면 DeleteOneTombstoneBusinessKeyStrategy를 사용합니다.

이 전략을 지정하려면 구성 속성을 다음 클래스 이름으로 설정합니다.

com.mongodb.kafka.connect.sink.writemodel.strategy.DeleteOneBusinessKeyStrategy

이 전략을 사용하는 방법을 보여주는 예를 보려면 쓰기 모델 전략 가이드를 참조하세요.

DeleteOneTombstoneBusinessKeyStrategy

설명:
비즈니스 키로 싱크 기록과 일치하는 최대 하나의 MongoDB 문서를 삭제합니다. 이 전략은 PartialKeyStrategy 을 활용하여 삭제에 사용될 키를 만듭니다.

이 전략을 지정하려면 구성 속성을 다음 클래스 이름으로 설정합니다.

com.mongodb.kafka.connect.sink.writemodel.strategy.DeleteOneTombstoneBusinessKeyStrategy

UpdateOneDefaultStrategy

설명:
_id 필드로 싱크 기록과 일치하는 MongoDB의 문서 최대 하나를 업데이트합니다. 일치하는 문서가 없는 경우 Connector는 싱크 기록을 새 문서로 삽입합니다.
이 전략을 지정하려면 구성 속성을 다음 클래스 이름으로 설정합니다.

com.mongodb.kafka.connect.sink.writemodel.strategy.UpdateOneDefaultStrategy

하나의 타임스탬프 업데이트 전략

설명:
_insertedTS (삽입 타임스탬프)와 _modifiedTS (수정 타임스탬프) 필드를 문서에 추가합니다.
이 전략을 지정하려면 구성 속성을 다음 클래스 이름으로 설정합니다.

com.mongodb.kafka.connect.sink.writemodel.strategy.UpdateOneTimestampsStrategy

이 전략을 사용하는 방법을 보여주는 예를 보려면 쓰기 모델 전략 가이드를 참조하세요.

UpdateOneBusinessKeyTimestampStrategy

설명:
비즈니스 키와 일치하는 문서에 _insertedTS (삽입된 타임스탬프) 및 _modifiedTS (수정된 타임스탬프) 필드를 추가합니다.
이 전략을 지정하려면 구성 속성을 다음 클래스 이름으로 설정합니다.

com.mongodb.kafka.connect.sink.writemodel.strategy.UpdateOneBusinessKeyTimestampStrategy
이 페이지 평가하기