CREATE DICTIONARY ... SOURCE MongoDB
CREATE DICTIONARY ... SOURCE MongoDB
MongoDB 소스는 MongoDB 데이터베이스에서 딕셔너리 데이터를 로드해요.
출처: 문서
본문
설정 예시:
- DDL
- Configuration file
SOURCE(MONGODB(
host 'localhost'
port 27017
user ''
password ''
db 'test'
collection 'dictionary_source'
options 'ssl=true'
))
또는 URI를 사용:
SOURCE(MONGODB(
uri 'mongodb://localhost:27017/clickhouse'
collection 'dictionary_source'
))
<source>
<mongodb>
<host>localhost</host>
<port>27017</port>
<user></user>
<password></password>
<db>test</db>
<collection>dictionary_source</collection>
<options>ssl=true</options>
</mongodb>
</source>
또는 URI를 사용:
<source>
<mongodb>
<uri>mongodb://localhost:27017/test?ssl=true</uri>
<collection>dictionary_source</collection>
</mongodb>
</source>
설정 필드:
| Setting | Description |
|---|---|
host |
MongoDB 호스트예요. |
port |
MongoDB 서버의 포트예요. |
user |
MongoDB 사용자의 이름이에요. |
password |
MongoDB 사용자의 비밀번호예요. |
db |
데이터베이스의 이름이에요. |
collection |
컬렉션의 이름이에요. |
options |
MongoDB 연결 문자열 옵션이에요. 선택 사항이에요. |
uri |
연결을 설정하기 위한 URI예요(개별 host/port/db 필드의 대안). |