Docs Menu

Docs HomeMongoDB Spark Connector

Read from MongoDB

On this page

  • Overview
  • SQL Queries


Inferring the Schema of a Change Stream

When the Spark Connector infers the schema of a DataFrame read from a change stream, by default, it will use the schema of the underlying collection rather than that of the change stream. If you set the option to true, the connector uses the schema of the change stream instead.

For more information on configuring a read operation, see the Change Streams section of the Read Configuration Options guide.

←  Write to MongoDBStructured Streaming with MongoDB →
Share Feedback