适用于 Atlas 和本地部署的 MongoDB Connector for Business Intelligence 将在 2026 年 9 月后达到生命周期结束 (EOL),并且不再提供支持。对于所有新项目,我们建议使用新的 MongoDB SQL 接口连接到 Atlas 或 Enterprise Advanced 部署。SQL 接口提供了更高的性能、更简化的设置和增强的功能。要了解更多信息,请参阅连接到 SQL。
地理空间数据
如果集合包含 2d 或 2dsphere 地理空间索引,BI Connector 会将索引字段映射到数字经纬度坐标的数组中。
例子
给定以下collection:
db.points.createIndex( { pos : "2dsphere" } ) db.points.insertOne({ pos : { type: "Point", coordinates: [ -73.97, 40.77 ] }, name: "Central Park", category : "Parks" })
BI Connector 生成以下模式:
schema: - db: test tables: - table: points collection: points pipeline: [] columns: - Name: _id MongoType: bson.ObjectId SqlName: _id SqlType: varchar - Name: category MongoType: string SqlName: category SqlType: varchar - Name: name MongoType: string SqlName: name SqlType: varchar - Name: pos.coordinates MongoType: geo.2darray SqlName: pos.coordinates SqlType: numeric[]
从视图读取数据时, BI Connector无法识别地理空间字段。