Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-9315

Stream documents from the sample cursor to the schema analysis

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: Data Modeling
    • None
    • Not Needed
    • Developer Tools

      Currently we fetch all of the documents from the sample (100 documents), and then pass them to the mongodb-schema schema analysis:
      https://github.com/mongodb-js/compass/blob/1717b9593e4fd6fdd93089a1d88aa81819ecfd68/packages/compass-data-modeling/src/store/analysis-process.ts#L158 

       

      To make this more performant and more responsive to cancelling, let's update it to pass the cursor from a sample to the schema analysis so it can async iterate over it. Let's make sure we still only sample 100 documents. This will also help us down the line if we want to make the sample more than 100 documents.

            Assignee:
            rhys.howell@mongodb.com Rhys Howell
            Reporter:
            rhys.howell@mongodb.com Rhys Howell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: