pajachiet / pymongo-schema Goto Github PK
View Code? Open in Web Editor NEWA schema analyser for MongoDB, written in Python.
License: GNU Lesser General Public License v3.0
A schema analyser for MongoDB, written in Python.
License: GNU Lesser General Public License v3.0
Question
Is the exported schema is actually Mongo DB schema or its in in another format?
Thanks
How do I import pymongo-schema
after successfully installing pymongo-schema how do I import it. If running in a console pymongo-schema cannot be imported.
import pymongo-schema
File "<ipython-input-8-b34e0579ec88>", line 1
import pymongo-schema
^
SyntaxError: invalid syntax
Or in a mongo shell I cannot run it.
> pymongo-schema -h
2017-10-03T20:01:46.947+1100 E QUERY [thread1] ReferenceError: pymongo is not defined :
@(shell):1:1
Unsure how to import the module can you advise please?
Implementing the option to display the full differences in the compare module, a choice needs to be made regarding the output format.
In the detailed diff, we'll have something like (potentially with more information like description, sensitive, etc.):
Hierarchy | Previous Schema | New Schema |
---|---|---|
borough | {"type": "string", "prop_in_object": 1.0, "count": 25359, "types_count": {"string": 25359}} | None |
_borough | None | {"type": "string", "prop_in_object": 1.0, "count": 25359, "types_count": {"string": 25359}} |
cuisine | {"type": "string"} | {"type": "ARRAY"} |
grades.grade | {"type": "string", "prop_in_object": 3.6856, "count": 93463, "types_count": {"string": 93463}} | None |
Currently, the summary view is like:
Hierarchy | Previous Schema | New Schema |
---|---|---|
borough | None | |
None | _borough | |
cuisine | {"type": "string"} | {"type": "ARRAY"} |
grades | grade | None |
Both views do not have the same hierarchy in the case of a missing / new field.
A solution would be to use the same hierarchy as the detailed view in the summary one, repeating the field name :
Hierarchy | Previous Schema | New Schema |
---|---|---|
borough | borough | None |
_borough | None | _borough |
cuisine | {"type": "string"} | {"type": "ARRAY"} |
grades.grade | grade | None |
What do you think about this solution ? Does it seem clear to you ?
Another possibility would be to give more details about the missing / new field in the schema columns.
But this might be confusing.
@pajachiet , @aureliengervasi which of these three solutions (or maybe another one) would you choose ?
When mapping an array of scalars from a dictionary field, the "valuefield' field gets filled with the shortened dictionary field name (eg: creneaux from rendez_vous_gu.creneaux)
But in the associated linked table, the target field is named with the full dictionnary field name (eg: rendez_vous_gu.creneaux).
As a consequence, the value is not propagated to the linked table, without raising an error.
Potential solution : using the full dictionnary field name in the "valuefield" field.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.