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

Export Schema Feature + Validation Detection

    • Type: Icon: Epic Epic
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Schema
    • None
    • Needed
    • Hide

      1. How does this change affect a user?

      It will be easier for users to export their schema (improved workflow compared to what exists today). They will also be able to generate schema validation rules based on a sample documents currently in their collection. 

      2. Why would a user want to use this?

      Exporting their schema can help with schema visibility. Users can also use JSON schema definitions in their existing workflows. Generating schema validation rules will allow users to enforce consistent document structure in their database. 

      3. What command or series of steps does the user follow to make this change?

      TBD - will be defined in designs 

      4. What is the expected result?

      TBD - will be defined more in scope & designs 

      5. Can this affect database performance? How?

      The act of exporting schema and generating validation rules will not affect performance. However, enforcing schema validation rules can slow DB writes. 

      6. Is there a minimum or maximum setting for this change (if this is a configurable parameter)?

      NA 

      7. How could the user break something by using this incorrectly?

      If a collection schema is very heterogenous, the sampled schema may not represent the actual schema. Generated validation rules could not reflect the user's actual intention. 

      8. Is there an ideal setting or way of using this feature?

      No 

      9. Does this feature affect any other settings or parts of the product?

      Collection-level document validation with JSON schema 

      10. Does this feature affect upgrade / downgrade compatibility?

      No 

      11. Does this replace some other thing that we should downplay / retire / remove?

      This will replace the existing export schema flow in Compass. 

      12. When are docs required? Iteratively throughout the project, at project close/feature release, or whenever the Docs team is able to prioritize after release?

      We may release this project in two parts (one for export and one for validation). If that's the case, it would be great to have the docs ready at each release. 

      Show
      1. How does this change affect a user? It will be easier for users to export their schema (improved workflow compared to what exists today). They will also be able to generate schema validation rules based on a sample documents currently in their collection.  2. Why would a user want to use this? Exporting their schema can help with schema visibility. Users can also use JSON schema definitions in their existing workflows. Generating schema validation rules will allow users to enforce consistent document structure in their database.  3. What command or series of steps does the user follow to make this change? TBD - will be defined in designs  4. What is the expected result? TBD - will be defined more in scope & designs  5. Can this affect database performance? How? The act of exporting schema and generating validation rules will not affect performance. However, enforcing schema validation rules can slow DB writes.  6. Is there a minimum or maximum setting for this change (if this is a configurable parameter)? NA  7. How could the user break something by using this incorrectly? If a collection schema is very heterogenous, the sampled schema may not represent the actual schema. Generated validation rules could not reflect the user's actual intention.  8. Is there an ideal setting or way of using this feature? No  9. Does this feature affect any other settings or parts of the product? Collection-level document validation with JSON schema  10. Does this feature affect upgrade / downgrade compatibility? No  11. Does this replace some other thing that we should downplay / retire / remove? This will replace the existing export schema flow in Compass.  12. When are docs required? Iteratively throughout the project, at project close/feature release, or whenever the Docs team is able to prioritize after release? We may release this project in two parts (one for export and one for validation). If that's the case, it would be great to have the docs ready at each release. 
    • To Do
    • Export Schema
    • 0
    • 0
    • 0
    • 100

      Complete the POC to add the export schema feature in the schema tab:

      • Add a button triggering a dialog to choose the exported format and relative options (done)
      • Remove the "Share schema as JSON" menu entry
      • Move the conversion functions to mongodb-schema
      • Write tests
      • Review with design

      Open questions:

      • How does it integrate with the "Hackolade" banner?
      • Do we want to keep the "share" to internal format?

            Assignee:
            Unassigned Unassigned
            Reporter:
            maurizio.casimirri@mongodb.com Maurizio Casimirri
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: