{"id":13656083,"url":"https://github.com/opencypher/morpheus","last_synced_at":"2026-04-01T17:22:01.282Z","repository":{"id":57739641,"uuid":"64759356","full_name":"opencypher/morpheus","owner":"opencypher","description":"Morpheus brings the leading graph query language, Cypher, onto the leading distributed processing platform, Spark.","archived":false,"fork":false,"pushed_at":"2026-01-14T15:36:21.000Z","size":32262,"stargazers_count":347,"open_issues_count":31,"forks_count":65,"subscribers_count":42,"default_branch":"master","last_synced_at":"2026-03-28T00:37:22.059Z","etag":null,"topics":["apache-spark","apache2","big-data","cypher","graph","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opencypher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.adoc","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-08-02T13:31:04.000Z","updated_at":"2026-02-26T08:06:47.000Z","dependencies_parsed_at":"2022-08-30T18:02:04.762Z","dependency_job_id":null,"html_url":"https://github.com/opencypher/morpheus","commit_stats":null,"previous_names":["opencypher/cypher-for-apache-spark"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/opencypher/morpheus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencypher%2Fmorpheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencypher%2Fmorpheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencypher%2Fmorpheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencypher%2Fmorpheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencypher","download_url":"https://codeload.github.com/opencypher/morpheus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencypher%2Fmorpheus/sbom","scorecard":{"id":709158,"data":{"date":"2025-08-11","repo":{"name":"github.com/opencypher/morpheus","commit":"f54768bab48cab4ae1cf8e2030420fedd9ab18d3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":8,"reason":"Found 7/8 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.4.2 not signed: https://api.github.com/repos/opencypher/morpheus/releases/17746778","Warn: release artifact 0.4.1 not signed: https://api.github.com/repos/opencypher/morpheus/releases/17607285","Warn: release artifact 0.3.2 not signed: https://api.github.com/repos/opencypher/morpheus/releases/16730687","Warn: release artifact 0.3.1 not signed: https://api.github.com/repos/opencypher/morpheus/releases/16434475","Warn: release artifact 0.4.2 does not have provenance: https://api.github.com/repos/opencypher/morpheus/releases/17746778","Warn: release artifact 0.4.1 does not have provenance: https://api.github.com/repos/opencypher/morpheus/releases/17607285","Warn: release artifact 0.3.2 does not have provenance: https://api.github.com/repos/opencypher/morpheus/releases/16730687","Warn: release artifact 0.3.1 does not have provenance: https://api.github.com/repos/opencypher/morpheus/releases/16434475"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T07:37:44.977Z","repository_id":57739641,"created_at":"2025-08-22T07:37:44.977Z","updated_at":"2025-08-22T07:37:44.977Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["apache-spark","apache2","big-data","cypher","graph","scala"],"created_at":"2024-08-02T04:00:49.380Z","updated_at":"2026-04-01T17:22:01.265Z","avatar_url":"https://github.com/opencypher.png","language":"Scala","funding_links":[],"categories":["Query engines"],"sub_categories":[],"readme":"[![Maven Central](https://img.shields.io/badge/Maven_Central-0.4.2-blue.svg?label=Maven%20Central)](https://search.maven.org/#artifactdetails%7Corg.opencypher%7Cmorpheus-spark-cypher%7C0.4.2%7Cjar)\n# Morpheus: Cypher for Apache Spark\n\n---\n**NOTE**\n\nThis project is no longer actively maintained.\nIf you want to know more, please reach out by creating an issue.\n\n---\n\nMorpheus extends [Apache Spark™](https://spark.apache.org) with [Cypher](https://neo4j.com/docs/developer-manual/current/cypher/), the industry's most widely used [property graph](https://github.com/opencypher/openCypher/blob/master/docs/property-graph-model.adoc) query language defined and maintained by the [openCypher](http://www.opencypher.org) project.\nIt allows for the **integration** of many **data sources** and supports **multiple graph** querying.\nIt enables you to use your Spark cluster to run **analytical graph queries**.\nQueries can also return graphs to create **processing pipelines**.\n\n**Note** This is the repo formerly known as opencypher/cypher-for-apache-spark\n\n## Intended audience\n\nMorpheus allows you to develop complex processing pipelines orchestrated by a powerful and expressive high-level language.\nIn addition to **developers** and **big data integration specialists**, Morpheus is also of practical use to **data scientists**, offering tools allowing for disparate data sources to be integrated into a single graph. From this graph, queries can extract subgraphs of interest into new result graphs, which can be conveniently exported for further processing.\n\nMorpheus builds on the Spark SQL DataFrame API, offering integration with standard Spark SQL processing and also allows\nintegration with GraphX. To learn more about this, please see our [examples](https://github.com/opencypher/morpheus/tree/master/morpheus-examples).\n \n\u003c!-- TODO: WIKI How does it relate to GraphFrames --\u003e\n\u003c!--- **Data Analysts**: --\u003e\n\u003c!--  This example shows how to aggregate detailed sales data within a graph — in effect, performing a ‘roll-up’ — in order to obtain a high-level summarized view of the data, stored and returned in another graph, as well as returning an even higher-level view as an executive report. The summarized graph may be used to draw further high-level reports, but may also be used to undertake ‘drill-down’ actions by probing into the graph to extract more detailed information.--\u003e\n\n## Current status: Pre-release\n\nThe functionality and APIs are stabilizing but surface changes (e.g. to the Cypher syntax and semantics for multiple graph processing and graph projections/construction) are still likely to occur. \nWe invite you to try out the project, and we welcome feedback and contributions.\n\nIf you are interested in contributing to the project we would love to hear from you; email us at `opencypher@neo4j.org` or just raise a PR. \nPlease note that this is an openCypher project and contributions can only be accepted if you’ve agreed to the  [openCypher Contributors Agreement (oCCA)](CONTRIBUTING.adoc).\n\n\u003c!--\n## Documentation\n\nA preview of the documentation for Morpheus is [available from Neo4j](https://neo4j.com/docs/morpheus-user-guide/1.0-preview/).\n--\u003e\n## Morpheus Features\n\nMorpheus is built on top of the Spark DataFrame API and uses features such as the Catalyst optimizer.\nThe Spark representations are accessible and can be converted to representations that integrate with other Spark libraries.\n\nMorpheus supports [a subset of Cypher](https://github.com/opencypher/morpheus/blob/master/documentation/asciidoc/cypher-cypher9-features.adoc) and is the first implementation of [multiple graphs](https://github.com/boggle/openCypher/blob/CIP2017-06-18-multiple-graphs/cip/1.accepted/CIP2017-06-18-multiple-graphs.adoc) and graph query compositionality.\n\nMorpheus currently supports importing graphs from Hive, Neo4j, relational database systems via JDBC and from files stored either locally, in HDFS or S3.\nMorpheus has a data source API that allows you to plug in custom data importers for external graphs.\n\n## Morpheus Roadmap\n\nMorpheus is under rapid development and we are planning to offer support for:\n- a large subset of the Cypher language\n- new Cypher Multiple Graph features\n- injection of custom graph data sources\n\n## Supported Spark and Scala versions\n\nAs of Morpheus `0.3.0`, the project has migrated to Scala 2.12 and Spark 2.4 series.\n[As of Spark 2.4.1](https://spark.apache.org/releases/spark-release-2-4-1.html) Scala 2.12 is officially supported for Spark.\nHowever, only Spark `2.4.2` uses Scala 2.12 for its prebuilt convenience binaries, which means that in order to use Morpheus with a later Spark version, one needs to build it manually.\n\n## Get started with Morpheus\nMorpheus is currently easiest to use with Scala. \nBelow we explain how you can import a simple graph and run a Cypher query on it.\n\n### Building Morpheus\n\nMorpheus is built using Gradle\n\n```\n./gradlew build\n```\n\n\n#### Add the Morpheus dependency to your project\nIn order to use Morpheus add the following dependency:\n\nMaven:\n\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.opencypher\u003c/groupId\u003e\n  \u003cartifactId\u003emorpheus-spark-cypher\u003c/artifactId\u003e\n  \u003cversion\u003e0.4.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nsbt:\n```\nlibraryDependencies += \"org.opencypher\" % \"morpheus-spark-cypher\" % \"0.4.2\"\n```\n\nRemember to add `fork in run := true` in your `build.sbt` for scala projects; this is not Morpheus\nspecific, but a quirk of spark execution that will help \n[prevent problems](https://stackoverflow.com/questions/44298847/why-do-we-need-to-add-fork-in-run-true-when-running-spark-sbt-application).\n\n### Hello Morpheus\n\nCypher is based on the [property graph](https://github.com/opencypher/openCypher/blob/master/docs/property-graph-model.adoc) data model, comprising labelled nodes and typed relationships, with a relationship either connecting two nodes, or forming a self-loop on a single node. \nBoth nodes and relationships are uniquely identified by an ID (Morpheus internally uses `Array[Byte]` to represent identifiers and auto-casts `Long`, `String` and `Integer` values), and contain a set of properties. \n\nThe following example shows how to convert a social network represented by two DataFrames to a `PropertyGraph`. \nOnce the property graph is constructed, it supports Cypher queries via its `cypher` method.\n\n```scala\nimport org.apache.spark.sql.DataFrame\nimport org.opencypher.morpheus.api.MorpheusSession\nimport org.opencypher.morpheus.api.io.{MorpheusNodeTable, MorpheusRelationshipTable}\nimport org.opencypher.morpheus.util.App\n\n/** Demonstrates basic usage of the Morpheus API by loading an example graph from [[DataFrame]]s. */\nobject DataFrameInputExample extends App {\n  // 1) Create Morpheus session and retrieve Spark session\n  implicit val morpheus: MorpheusSession = MorpheusSession.local()\n  val spark = morpheus.sparkSession\n\n  import spark.sqlContext.implicits._\n\n  // 2) Generate some DataFrames that we'd like to interpret as a property graph.\n  val nodesDF = spark\n    .createDataset(\n      Seq(\n        (0L, \"Alice\", 42L),\n        (1L, \"Bob\", 23L),\n        (2L, \"Eve\", 84L)\n      )\n    )\n    .toDF(\"id\", \"name\", \"age\")\n  val relsDF = spark\n    .createDataset(\n      Seq(\n        (0L, 0L, 1L, \"23/01/1987\"),\n        (1L, 1L, 2L, \"12/12/2009\")\n      )\n    )\n    .toDF(\"id\", \"source\", \"target\", \"since\")\n\n  // 3) Generate node- and relationship tables that wrap the DataFrames. The mapping between graph elements and columns\n  //    is derived using naming conventions for identifier columns.\n  val personTable = MorpheusNodeTable(Set(\"Person\"), nodesDF)\n  val friendsTable = MorpheusRelationshipTable(\"KNOWS\", relsDF)\n\n  // 4) Create property graph from graph scans\n  val graph = morpheus.readFrom(personTable, friendsTable)\n\n  // 5) Execute Cypher query and print results\n  val result = graph.cypher(\"MATCH (n:Person) RETURN n.name\")\n\n  // 6) Collect results into string by selecting a specific column.\n  //    This operation may be very expensive as it materializes results locally.\n  val names: Set[String] =\n    result.records.table.df.collect().map(_.getAs[String](\"n_name\")).toSet\n\n  println(names)\n}\n```\n\nThe above program prints:\n```\nSet(Alice, Bob, Eve)\n```\n\nMore examples, including [multiple graph features](morpheus-examples/src/main/scala/org/opencypher/morpheus/examples/MultipleGraphExample.scala), can be found [in the examples module](morpheus-examples).\n\n### Run example Scala apps via command line\n\nYou can use Gradle to run a specific Scala application from command line. For example, to run the `DataFrameInputExample` \nwithin the `morpheus-examples` module, we just call:\n\n```\n./gradlew morpheus-examples:runApp -PmainClass=org.opencypher.morpheus.examples.DataFrameInputExample\n```\n\n#### Next steps\n\n- How to use Morpheus in [Apache Zeppelin](https://github.com/opencypher/morpheus/wiki/Use-CAPS-in-a-Zeppelin-notebook)\n- Look at and contribute to the [Wiki](https://github.com/opencypher/morpheus/wiki)\n\u003c!-- TODO: Steps needed to run the demo with toy data --\u003e\n\u003c!-- TODO: WIKI article that demonstrates a more realistic use case with HDFS data source --\u003e\n\u003c!-- TODO: WIKI link to page that explains how to import data --\u003e\n\n## How to contribute\n\nWe would love to find out about any [issues](https://github.com/opencypher/morpheus/issues) you encounter and are happy to accept contributions following a Contributors License Agreement (CLA) signature as per the process outlined in our [contribution guidelines](CONTRIBUTING.adoc).\n\n## Disclaimer\n\nThis repository is not an official Neo4j product or project. It is maintained by Neo4j employees or contributors in a personal or experimental capacity. The content here is provided “as is,” comes with no guarantees, and is unsupported.\n\n## License\n\nThe project is licensed under the Apache Software License, Version 2.0, with an extended attribution notice as described in [the license header](/etc/licenses/headers/NOTICE-header.txt).\n\n## Copyright\n\n© Copyright 2016-2019 Neo4j, Inc.\n\nApache Spark™, Spark, and Apache are registered trademarks of the [Apache Software Foundation](https://www.apache.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencypher%2Fmorpheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencypher%2Fmorpheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencypher%2Fmorpheus/lists"}