{"id":13529887,"url":"https://github.com/graphaware/neo4j-graphgen-procedure","last_synced_at":"2025-07-04T14:37:30.242Z","repository":{"id":69925651,"uuid":"56416513","full_name":"graphaware/neo4j-graphgen-procedure","owner":"graphaware","description":"Neo4j Procedure for generating test data","archived":false,"fork":false,"pushed_at":"2016-06-29T20:01:48.000Z","size":58,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-11-02T16:35:37.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://graphaware.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphaware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-04-17T03:08:14.000Z","updated_at":"2023-07-19T07:43:04.000Z","dependencies_parsed_at":"2023-04-21T09:06:47.065Z","dependency_job_id":null,"html_url":"https://github.com/graphaware/neo4j-graphgen-procedure","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fneo4j-graphgen-procedure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fneo4j-graphgen-procedure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fneo4j-graphgen-procedure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fneo4j-graphgen-procedure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphaware","download_url":"https://codeload.github.com/graphaware/neo4j-graphgen-procedure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225700876,"owners_count":17510448,"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":[],"created_at":"2024-08-01T07:00:40.323Z","updated_at":"2024-11-21T09:14:56.535Z","avatar_url":"https://github.com/graphaware.png","language":"Java","funding_links":[],"categories":["Stored Procedures","REST API"],"sub_categories":["REST API","Other"],"readme":"# GraphAware Graphgen Procedure\n\n## Generate Graph Test Data easily in your Neo4j browser\n\n[![Build Status](https://travis-ci.org/graphaware/neo4j-graphgen-procedure.svg?branch=master)](https://travis-ci.org/graphaware/neo4j-graphgen-procedure) Current release: (no release) - 1.0-ALPHA\n\n### Usage\n\n* Clone this repository, run `mvn clean package` and put the produced `graphaware-graphgen-procedure-1.0-ALPHA.jar` file in the Neo4j's `plugins` folder\n* Restart your Neo4j instance\n\n### Generating nodes\n\nNodes are generated using the `generate.nodes()` procedure call. The procedure takes 3 arguments :\n\n* A `string or list of strings` representing one or multiple labels (eg: `'Person'` or `['Person', 'User']`)\n* An `inline yaml string` definition of key/value pairs where value represent a data generator (eg: `'{firstname: firstName, age:{numberBetween:[18,35]}}'`)\n* An `integer` representing the amount of nodes to be generated\n\nExample :\n\n```cypher\nCALL generate.nodes('Person', '{name: fullName}', 10)\n```\n\nThe procedure returns a `List` of Node objects for further processing, they can explicitely be yielded with the `nodes` name :\n\n```cypher\nCALL generate.nodes('Person', '{name: fullName}', 10) YIELD nodes as persons RETURN persons\n```\n\n\n### Generating relationships\n\nRelationships are generated using the `generate.relationships` procedure call. The procedure takes 6 arguments :\n\n* A `List` of nodes to start from\n* A `List` of nodes to end to\n* A `String` representing the relationship type\n* An `inline yaml` definition of key/value pairs where value represent a data generator (eg: `'{since: unixTime}'`)\n* An `integer or String` representing the amount of nodes from the start list to use\n* An `integer or String` representing the amount of nodes each start node will connect to an end node\n\nThe two last parameters are dynamic, for example :\n\n* `1` exactly one node to be used from the given list\n* `1-5` a random number between 1 and 5 will be generated and used as amount\n\nExample :\n\n```cypher\nCALL generate.nodes('Person', '{name: fullName}', 10) YIELD nodes as persons\nCALL generate.nodes('Skill', '{name: word}', 20) YIELD nodes as skills\nCALL generate.relationships(persons, skills, 'HAS_SKILL', '{since: unixTime}', 10, '3-7')\nYIELD relationships as relationships RETURN *\n```\n\n### Generating values\n\nAs the same way you can create node and relationships, you can generate values :\n\n```cypher\nCALL generate.values('firstName', null, 10) YIELD values as values RETURN *\n```\n\nthe second argument takes parameters when value generators need them, like `numberBetween` for example :\n\n```cypher\nCALL generate.values('numberBetween', [10, 100], 25) YIELD values RETURN values\n```\n\nThis will generate 25 randomly generated numbers between 10 and 100.\n\n## Extra procedures\n\n### Generating Linked Lists\n\n```cypher\nCALL generate.nodes('Feed', '{time: unixTime}', 10) YIELD nodes as feeds\nCALL generate.linkedList(feeds, 'NEXT') YIELD relationships, nodes\nRETURN *\n```\n\nReturns a linked list of feed nodes : `(feed)-[:NEXT]-\u003e(feed)-[:NEXT]-\u003e(feed)-[:NEXT]-\u003e(...)`\n\n\n### Available data providers\n\n#### Names\n\n* `firstName`\n* `lastName`\n* `fullName`\n\n#### Address\n\n* `city`\n* `country`\n* `state`\n* `streetAddress`\n* `streetName`\n* `zipCode`\n* `latitude(min = -90, max = 90)`\n* `longitude(min = -180, max = 180)`\n\n#### Numbers\n\n* `randomNumber(numberOfDigits = 5, strict = false)` | numberOfDigits : default value generated, strict: generate only numbers with given number of digits\n* `randomFloat`\n* `numberBetween(a, b)`\n\n#### Business\n\n* `creditCardNumber`\n* `creditCardType`\n\n#### Company\n\n* `companyName`\n\n#### Internet\n\n* `avatarUrl`\n* `email`\n* `url`\n* `ipv4`\n\n#### Lorem\n\n* `paragraph`\n* `sentence`\n* `word`\n\n#### Phone\n\n* `phoneNumber`\n\n#### Time\n\n* `unixtime`\n\nLicense\n-------\n\nCopyright (c) 2013-2016 GraphAware\n\nGraphAware is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License\nas published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied\nwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\nYou should have received a copy of the GNU General Public License along with this program.\nIf not, see \u003chttp://www.gnu.org/licenses/\u003e.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphaware%2Fneo4j-graphgen-procedure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphaware%2Fneo4j-graphgen-procedure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphaware%2Fneo4j-graphgen-procedure/lists"}