neo_named_nodes: neo_named_nodes

Description Usage Arguments Details

Description

create unique-constrained named nodes from unique values in a dataframe column.

Usage

1
neo_named_nodes(df, col, label = col, property_key = "Name")

Arguments

df

The data.frame containing the column.

col

The name of the column, as a string.

label

The node label to set in Neo4j for these nodes. As a string.

property_key

The name for the property key for these values. Eg. "Name" for nodes labeled "Person". The default is "Name". As a string.

Details

If you have a column with values that can stand as a unique identifier for the type of nodes they represent, this function creates a constraint that nodes with this label are uniquely constrained by the property key you identify.

Imagine you want to create nodes representing US Postal Codes. Point this function to a column containing the zip codes. You might set the node label to be "Zip_Code". By default, the property key is set to "Name," but you might choose "Zip" as more intuitive than using Cypher QL to match: .... where Zip_Code.Name = '24710'


brendan-newlon/df2neo4j documentation built on Sept. 19, 2020, 5:44 a.m.