Docs Menu

Geospatial Data

On this page

  • 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.

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.

On this page

Give Feedback
© 2021 MongoDB, Inc.

About

  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.