Docs Home → MongoDB Spark Connector
Read from MongoDB
On this page
Overview
Important
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 change.stream.publish.full.document.only
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.