{"id":20274870,"url":"https://github.com/makomo/mongo2neo4j","last_synced_at":"2025-04-11T05:23:23.389Z","repository":{"id":187655088,"uuid":"670100918","full_name":"MAKOMO/mongo2neo4j","owner":"MAKOMO","description":"MongoDB Mongoose to Neo4j Importer","archived":false,"fork":false,"pushed_at":"2024-11-20T20:06:51.000Z","size":1644,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-25T03:27:12.557Z","etag":null,"topics":["conversion","exploration","mongodb","mongoose","neo4j","semspect"],"latest_commit_sha":null,"homepage":"https://makomo.github.io/mongo2neo4j/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MAKOMO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-24T09:47:21.000Z","updated_at":"2024-11-20T20:06:54.000Z","dependencies_parsed_at":"2023-08-11T16:24:29.305Z","dependency_job_id":"54e1b940-b366-4287-90e6-e199cdd8fffd","html_url":"https://github.com/MAKOMO/mongo2neo4j","commit_stats":null,"previous_names":["makomo/mongo2neo4j"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAKOMO%2Fmongo2neo4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAKOMO%2Fmongo2neo4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAKOMO%2Fmongo2neo4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAKOMO%2Fmongo2neo4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MAKOMO","download_url":"https://codeload.github.com/MAKOMO/mongo2neo4j/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248346400,"owners_count":21088451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["conversion","exploration","mongodb","mongoose","neo4j","semspect"],"created_at":"2024-11-14T13:06:34.291Z","updated_at":"2025-04-11T05:23:23.377Z","avatar_url":"https://github.com/MAKOMO.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [mongo2neo4j](https://makomo.github.io/mongo2neo4j/)\n\n[MongoDB](https://www.mongodb.com/) [Mongoose](https://mongoosejs.com/) to [Neo4j](https://neo4j.com/) Importer\n\n![License](https://img.shields.io/github/license/MAKOMO/mongo2neo4j.svg)\n[![Pylint](https://github.com/MAKOMO/mongo2neo4j/actions/workflows/pylint.yaml/badge.svg)](https://github.com/MAKOMO/mongo2neo4j/actions/workflows/pylint.yaml)\n[![Ruff](https://github.com/MAKOMO/mongo2neo4j/actions/workflows/ruff.yaml/badge.svg)](https://github.com/MAKOMO/mongo2neo4j/actions/workflows/ruff.yaml)\n[![Mypy](https://github.com/MAKOMO/mongo2neo4j/actions/workflows/mypy.yml/badge.svg)](https://github.com/MAKOMO/mongo2neo4j/actions/workflows/mypy.yml)\n[![pytest](https://github.com/artisan-roaster-scope/artisan/actions/workflows/pytest.yaml/badge.svg?branch=master)](https://github.com/artisan-roaster-scope/artisan/actions/workflows/pytest.yaml)\n![coverage](./images/coverage.svg)\n\n\n## What is mongo2neo4j?\n\nImports object relations generated by Object Relation Mappers (ORMs) like [Mongoose](https://mongoosejs.com/) and stored in [MongoDB](https://www.mongodb.com/) into the graph database management system [Neo4j](https://neo4j.com/) for exploration with the no-code graphical querying tool [SemSpect](https://www.semspect.de/). Further relations between objects can be specified via options.\n\n![](https://github.com/MAKOMO/mongo2neo4j/blob/main/images/motivation.jpg?raw=true)\n\n_References_\u003cbr\u003e\n[Graph Exploration By All MEANS With mongo2neo4j and SemSpect](https://neo4j.com/developer-blog/mean-stack-mongo2neo4j-semspect/); Neo4j Developer Blog (6/2024)\n[NODES 2024 - Exploration of Your MEAN Stack With mongo2neo4j and SemSpect](https://www.youtube.com/watch?v=Ini2nTIix_Q); Presentation at NODES 2024 Developer Conference (11/2024)\n\n## What for?\n\nImagine you just released your latest [MEAN-stack](https://en.wikipedia.org/wiki/MEAN_(solution_stack)) app and want to learn how it is used. You could write some [MongoDB](https://www.mongodb.com/) queries to find out _\"how many users of the free tier are at all producing some data?\", \"which feature is used most by subscribers?\",_ ... But maybe you never find time to write those queries or you do not know exact what to look for. A graphical large-data exploration tool like [SemSpect](https://www.semspect.de/) comes in handy, which allows you to discover patterns in your data by simple navigation.\n\n![](https://github.com/MAKOMO/mongo2neo4j/blob/main/images/semspect.jpg?raw=true)\n\nAs [SemSpect](https://www.semspect.de/) is layered on top of the graph database system [Neo4j](https://neo4j.com/) as graph app, your [MongoDB](https://www.mongodb.com/) data needs first to be established in [Neo4j](https://neo4j.com/). This can be easily achieved using the `mongo2neo4j` tool.\n\n\n## How does it work?\n\nThe `mongodb2neo4j` script creates a label (class of nodes) in [Neo4j](https://neo4j.com/) for each collection in the given [MongoDB](https://www.mongodb.com/) and adds nodes in [Neo4j](https://neo4j.com/) for all documents. Cross-references between [MongoDB](https://www.mongodb.com/) documents using unique `ObjectId` identifiers are turned into [Neo4j](https://neo4j.com/) relations, nicely rendered by [SemSpect](https://www.semspect.de/).\n\n![](https://github.com/MAKOMO/mongo2neo4j/blob/main/images/mongodb.jpg?raw=true)\n\n\n## Installation\n\n### Install Neo4j\n\nThe free Neo4j Desktop works well (see [Neo4j](https://neo4j.com/))\n\n### Install SemSpect Plugin\n\nThe free SemSpect Graph App for Neo4j works well (see [SemSpect](https://www.semspect.de/))\n\n### Install `mongo2neo4j`\n\nNote: mongo2neo4j requires [Python 3.11](https://www.python.org/) or newer.\n\n```sh\n% pip3 install mongo2neo4j\n```\n\n## Run the importer\n\nYou can run the `mongo2neo4j`importer from the shell by providing at least the name of the [MongoDB](https://www.mongodb.com/) DB the data should be imported from. If not specified the default `neo4j` DB is targeted with the default `neo4j` user. It is likely that you will have to add passwords.\n\n```sh\n% mongo2neo4j \\\n  [--mongo_host mongodb://\u003cmongo_user\u003e:\u003cmongo_password\u003e@\u003cmongo_host\u003e] \\\n  [--neo4j_user=\u003cneo4j_user\u003e] [--neo4j_password=\u003cneo4j_password\u003e] \\\n  \u003cmongo_db\u003e\n```\n\nFurther configuration options are listed on calling\n\n```sh\n% mongo2neo4j -h\n```\n\nSee [Script Arguments](https://github.com/MAKOMO/mongo2neo4j/wiki/Script-Arguments) for the full list of available arguments and the [example](https://github.com/MAKOMO/mongo2neo4j/blob/main/example/README.md) documenting the workflow of mongo2neo4j using randomly generated sample data.\n\n\n\n\nNOTE: *if the [APOC plugin](https://neo4j.com/docs/apoc/) is installed in the Neo4j DB, the faster and memory-effective `apoc.periodic.iterate` method is used to generate nodes and sublabels.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakomo%2Fmongo2neo4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakomo%2Fmongo2neo4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakomo%2Fmongo2neo4j/lists"}