Home

Awesome

GraphAware Graphgen Procedure

Generate Graph Test Data easily in your Neo4j browser

Build Status Current release: (no release) - 1.0-ALPHA

Usage

Generating nodes

Nodes are generated using the generate.nodes() procedure call. The procedure takes 3 arguments :

Example :

CALL generate.nodes('Person', '{name: fullName}', 10)

The procedure returns a List of Node objects for further processing, they can explicitely be yielded with the nodes name :

CALL generate.nodes('Person', '{name: fullName}', 10) YIELD nodes as persons RETURN persons

Generating relationships

Relationships are generated using the generate.relationships procedure call. The procedure takes 6 arguments :

The two last parameters are dynamic, for example :

Example :

CALL generate.nodes('Person', '{name: fullName}', 10) YIELD nodes as persons
CALL generate.nodes('Skill', '{name: word}', 20) YIELD nodes as skills
CALL generate.relationships(persons, skills, 'HAS_SKILL', '{since: unixTime}', 10, '3-7')
YIELD relationships as relationships RETURN *

Generating values

As the same way you can create node and relationships, you can generate values :

CALL generate.values('firstName', null, 10) YIELD values as values RETURN *

the second argument takes parameters when value generators need them, like numberBetween for example :

CALL generate.values('numberBetween', [10, 100], 25) YIELD values RETURN values

This will generate 25 randomly generated numbers between 10 and 100.

Extra procedures

Generating Linked Lists

CALL generate.nodes('Feed', '{time: unixTime}', 10) YIELD nodes as feeds
CALL generate.linkedList(feeds, 'NEXT') YIELD relationships, nodes
RETURN *

Returns a linked list of feed nodes : (feed)-[:NEXT]->(feed)-[:NEXT]->(feed)-[:NEXT]->(...)

Available data providers

Names

Address

Numbers

Business

Company

Internet

Lorem

Phone

Time

License

Copyright (c) 2013-2016 GraphAware

GraphAware is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.