Geospatial Data
On this page
This version of the documentation is archived and no longer supported. View the current documentation instead.
Geospatial Data
If a collection contains a 2d
or 2dsphere
geospatial index,
BI Connector maps the indexed field into an array of numeric
longitude-latitude coordinates.
Example
Given the following collection:
db.points.createIndex( { pos : "2dsphere" } ) db.points.insertOne({ pos : { type: "Point", coordinates: [ -73.97, 40.77 ] }, name: "Central Park", category : "Parks" })
BI Connector generates the following schema:
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[]
Note
BI Connector does not recognize geospatial fields when reading from a view.