设置示例:
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>设置字段:
| 设置 | 描述 |
|---|---|
host |
MongoDB 主机。 |
port |
MongoDB 服务器端口。 |
user |
MongoDB 用户名。 |
password |
MongoDB 用户密码。 |
db |
数据库名称。 |
collection |
集合名称。 |
options |
MongoDB 连接字符串选项。可选。 |
uri |
用于建立连接的 URI (可替代单独的 host/port/db 字段) 。 |