This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new e02074245a Fixes #1856 : Neo4j Constraint action should use 5.0 syntax
new e5accd3071 Merge pull request #1857 from mattcasters/cypher-builder
e02074245a is described below
commit e02074245aca8fce9d237c8113fc5c78f9fd6da2
Author: Matt Casters <[email protected]>
AuthorDate: Thu Dec 1 10:11:22 2022 +0100
Fixes #1856 : Neo4j Constraint action should use 5.0 syntax
---
.../neo4j/datasets/golden-action-constraint.csv | 3 +
.../neo4j/datasets/golden-action-cypher-script.csv | 5 +
.../metadata/dataset/golden-action-constraint.json | 56 +++++++
.../dataset/golden-action-cypher-script.json | 24 +++
.../neo4j-action-constraint-validate UNIT.json | 53 +++++++
.../neo4j-action-cypher-script-validate UNIT.json | 32 ++++
.../main-action-constraint.hwf | 169 +++++++++++++++++++++
.../neo4j-action-constraint-validate.hpl | 126 +++++++++++++++
.../neo4j-action-cypher-script-validate.hpl | 106 +++++++++++++
.../neo4j-action-cypher-script.hwf | 141 +++++++++++++++++
.../neo4j/actions/constraint/Neo4jConstraint.java | 6 +-
11 files changed, 718 insertions(+), 3 deletions(-)
diff --git a/integration-tests/neo4j/datasets/golden-action-constraint.csv
b/integration-tests/neo4j/datasets/golden-action-constraint.csv
new file mode 100644
index 0000000000..5689bdae97
--- /dev/null
+++ b/integration-tests/neo4j/datasets/golden-action-constraint.csv
@@ -0,0 +1,3 @@
+name,type,entityType,labelsOrTypes,properties,createStatement
+pk_person_id,UNIQUENESS,NODE,"[""Person""]","[""ID""]","CREATE CONSTRAINT
`pk_person_id` FOR (n:`Person`) REQUIRE (n.`ID`) IS UNIQUE OPTIONS
{indexConfig: {}, indexProvider: 'range-1.0'}"
+nn_person_name,NODE_PROPERTY_EXISTENCE,NODE,"[""Person""]","[""name""]",CREATE
CONSTRAINT `nn_person_name` FOR (n:`Person`) REQUIRE (n.`name`) IS NOT NULL
diff --git a/integration-tests/neo4j/datasets/golden-action-cypher-script.csv
b/integration-tests/neo4j/datasets/golden-action-cypher-script.csv
new file mode 100644
index 0000000000..3710dd48b7
--- /dev/null
+++ b/integration-tests/neo4j/datasets/golden-action-cypher-script.csv
@@ -0,0 +1,5 @@
+id,name
+1,Apache Beam
+2,Apache Spark
+3,Apache Flink
+4,Apache Hop
diff --git
a/integration-tests/neo4j/metadata/dataset/golden-action-constraint.json
b/integration-tests/neo4j/metadata/dataset/golden-action-constraint.json
new file mode 100644
index 0000000000..1c9cd994aa
--- /dev/null
+++ b/integration-tests/neo4j/metadata/dataset/golden-action-constraint.json
@@ -0,0 +1,56 @@
+{
+ "base_filename": "golden-action-constraint.csv",
+ "name": "golden-action-constraint",
+ "description": "",
+ "dataset_fields": [
+ {
+ "field_comment": "",
+ "field_length": -1,
+ "field_type": 2,
+ "field_precision": -1,
+ "field_name": "name",
+ "field_format": ""
+ },
+ {
+ "field_comment": "",
+ "field_length": -1,
+ "field_type": 2,
+ "field_precision": -1,
+ "field_name": "type",
+ "field_format": ""
+ },
+ {
+ "field_comment": "",
+ "field_length": -1,
+ "field_type": 2,
+ "field_precision": -1,
+ "field_name": "entityType",
+ "field_format": ""
+ },
+ {
+ "field_comment": "",
+ "field_length": -1,
+ "field_type": 2,
+ "field_precision": -1,
+ "field_name": "labelsOrTypes",
+ "field_format": ""
+ },
+ {
+ "field_comment": "",
+ "field_length": -1,
+ "field_type": 2,
+ "field_precision": -1,
+ "field_name": "properties",
+ "field_format": ""
+ },
+ {
+ "field_comment": "",
+ "field_length": -1,
+ "field_type": 2,
+ "field_precision": -1,
+ "field_name": "createStatement",
+ "field_format": ""
+ }
+ ],
+ "folder_name": ""
+}
\ No newline at end of file
diff --git
a/integration-tests/neo4j/metadata/dataset/golden-action-cypher-script.json
b/integration-tests/neo4j/metadata/dataset/golden-action-cypher-script.json
new file mode 100644
index 0000000000..be0b7be9f0
--- /dev/null
+++ b/integration-tests/neo4j/metadata/dataset/golden-action-cypher-script.json
@@ -0,0 +1,24 @@
+{
+ "base_filename": "golden-action-cypher-script.csv",
+ "name": "golden-action-cypher-script",
+ "description": "",
+ "dataset_fields": [
+ {
+ "field_comment": "",
+ "field_length": -1,
+ "field_type": 5,
+ "field_precision": 0,
+ "field_name": "id",
+ "field_format": "####0;-####0"
+ },
+ {
+ "field_comment": "",
+ "field_length": -1,
+ "field_type": 2,
+ "field_precision": -1,
+ "field_name": "name",
+ "field_format": ""
+ }
+ ],
+ "folder_name": ""
+}
\ No newline at end of file
diff --git
a/integration-tests/neo4j/metadata/unit-test/neo4j-action-constraint-validate
UNIT.json
b/integration-tests/neo4j/metadata/unit-test/neo4j-action-constraint-validate
UNIT.json
new file mode 100644
index 0000000000..7b2c70f6b9
--- /dev/null
+++
b/integration-tests/neo4j/metadata/unit-test/neo4j-action-constraint-validate
UNIT.json
@@ -0,0 +1,53 @@
+{
+ "variableValues": [],
+ "database_replacements": [],
+ "autoOpening": true,
+ "basePath": "",
+ "golden_data_sets": [
+ {
+ "field_mappings": [
+ {
+ "transform_field": "name",
+ "data_set_field": "name"
+ },
+ {
+ "transform_field": "type",
+ "data_set_field": "type"
+ },
+ {
+ "transform_field": "entityType",
+ "data_set_field": "entityType"
+ },
+ {
+ "transform_field": "labelsOrTypes",
+ "data_set_field": "labelsOrTypes"
+ },
+ {
+ "transform_field": "properties",
+ "data_set_field": "properties"
+ },
+ {
+ "transform_field": "createStatement",
+ "data_set_field": "createStatement"
+ }
+ ],
+ "field_order": [
+ "name",
+ "type",
+ "entityType",
+ "labelsOrTypes",
+ "properties",
+ "createStatement"
+ ],
+ "data_set_name": "golden-action-constraint",
+ "transform_name": "Validate"
+ }
+ ],
+ "input_data_sets": [],
+ "name": "neo4j-action-constraint-validate UNIT",
+ "description": "",
+ "persist_filename": "",
+ "trans_test_tweaks": [],
+ "pipeline_filename":
"./tests/neo4j-action-constraint/neo4j-action-constraint-validate.hpl",
+ "test_type": "UNIT_TEST"
+}
\ No newline at end of file
diff --git
a/integration-tests/neo4j/metadata/unit-test/neo4j-action-cypher-script-validate
UNIT.json
b/integration-tests/neo4j/metadata/unit-test/neo4j-action-cypher-script-validate
UNIT.json
new file mode 100644
index 0000000000..d2a44f8e0c
--- /dev/null
+++
b/integration-tests/neo4j/metadata/unit-test/neo4j-action-cypher-script-validate
UNIT.json
@@ -0,0 +1,32 @@
+{
+ "variableValues": [],
+ "database_replacements": [],
+ "autoOpening": true,
+ "basePath": "",
+ "golden_data_sets": [
+ {
+ "field_mappings": [
+ {
+ "transform_field": "id",
+ "data_set_field": "id"
+ },
+ {
+ "transform_field": "name",
+ "data_set_field": "name"
+ }
+ ],
+ "field_order": [
+ "id"
+ ],
+ "data_set_name": "golden-action-cypher-script",
+ "transform_name": "Verify"
+ }
+ ],
+ "input_data_sets": [],
+ "name": "neo4j-action-cypher-script-validate UNIT",
+ "description": "",
+ "persist_filename": "",
+ "trans_test_tweaks": [],
+ "pipeline_filename":
"./tests/neo4j-action-cypher-script/neo4j-action-cypher-script-validate.hpl",
+ "test_type": "UNIT_TEST"
+}
\ No newline at end of file
diff --git
a/integration-tests/neo4j/tests/neo4j-action-constraint/main-action-constraint.hwf
b/integration-tests/neo4j/tests/neo4j-action-constraint/main-action-constraint.hwf
new file mode 100644
index 0000000000..11a90249ca
--- /dev/null
+++
b/integration-tests/neo4j/tests/neo4j-action-constraint/main-action-constraint.hwf
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+ <name>main-action-constraint</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <workflow_version/>
+ <created_user>-</created_user>
+ <created_date>2022/12/01 09:39:14.385</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2022/12/01 09:39:14.385</modified_date>
+ <parameters>
+ </parameters>
+ <actions>
+ <action>
+ <name>Start</name>
+ <description/>
+ <type>SPECIAL</type>
+ <attributes/>
+ <DayOfMonth>1</DayOfMonth>
+ <hour>12</hour>
+ <intervalMinutes>60</intervalMinutes>
+ <intervalSeconds>0</intervalSeconds>
+ <minutes>0</minutes>
+ <repeat>N</repeat>
+ <schedulerType>0</schedulerType>
+ <weekDay>1</weekDay>
+ <parallel>N</parallel>
+ <xloc>96</xloc>
+ <yloc>64</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>cleanup-database.hwf</name>
+ <description/>
+ <type>WORKFLOW</type>
+ <attributes/>
+ <run_configuration>local</run_configuration>
+ <filename>${PROJECT_HOME}/tests/shared/cleanup-database.hwf</filename>
+ <params_from_previous>N</params_from_previous>
+ <exec_per_row>N</exec_per_row>
+ <set_logfile>N</set_logfile>
+ <logfile/>
+ <logext/>
+ <add_date>N</add_date>
+ <add_time>N</add_time>
+ <loglevel>Nothing</loglevel>
+ <wait_until_finished>Y</wait_until_finished>
+ <create_parent_folder>N</create_parent_folder>
+ <run_configuration>local</run_configuration>
+ <parameters>
+ <pass_all_parameters>Y</pass_all_parameters>
+ </parameters>
+ <set_append_logfile>N</set_append_logfile>
+ <parallel>N</parallel>
+ <xloc>544</xloc>
+ <yloc>64</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>Check Neo4j Connections</name>
+ <description/>
+ <type>NEO4J_CHECK_CONNECTIONS</type>
+ <attributes/>
+ <connections>
+ <connection>Test</connection>
+ </connections>
+ <parallel>N</parallel>
+ <xloc>288</xloc>
+ <yloc>64</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>Neo4j Constraint</name>
+ <description/>
+ <type>NEO4J_CONSTRAINT</type>
+ <attributes/>
+ <connection>Test</connection>
+ <updates>
+ <update>
+ <constraint_type>UNIQUE</constraint_type>
+ <index_name>pk_person_id</index_name>
+ <object_name>Person</object_name>
+ <object_properties>ID</object_properties>
+ <object_type>NODE</object_type>
+ <update_type>CREATE</update_type>
+ </update>
+ <update>
+ <constraint_type>NOT_NULL</constraint_type>
+ <index_name>nn_person_name</index_name>
+ <object_name>Person</object_name>
+ <object_properties>name</object_properties>
+ <object_type>NODE</object_type>
+ <update_type>CREATE</update_type>
+ </update>
+ </updates>
+ <parallel>N</parallel>
+ <xloc>288</xloc>
+ <yloc>208</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>Run Pipeline Unit Tests</name>
+ <description/>
+ <type>RunPipelineTests</type>
+ <attributes/>
+ <test_names>
+ <test_name>
+ <name>neo4j-action-constraint-validate UNIT</name>
+ </test_name>
+ </test_names>
+ <parallel>N</parallel>
+ <xloc>544</xloc>
+ <yloc>208</yloc>
+ <attributes_hac/>
+ </action>
+ </actions>
+ <hops>
+ <hop>
+ <from>Check Neo4j Connections</from>
+ <to>cleanup-database.hwf</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>N</unconditional>
+ </hop>
+ <hop>
+ <from>Start</from>
+ <to>Check Neo4j Connections</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>Y</unconditional>
+ </hop>
+ <hop>
+ <from>cleanup-database.hwf</from>
+ <to>Neo4j Constraint</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>N</unconditional>
+ </hop>
+ <hop>
+ <from>Neo4j Constraint</from>
+ <to>Run Pipeline Unit Tests</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>N</unconditional>
+ </hop>
+ </hops>
+ <notepads>
+ </notepads>
+ <attributes/>
+</workflow>
diff --git
a/integration-tests/neo4j/tests/neo4j-action-constraint/neo4j-action-constraint-validate.hpl
b/integration-tests/neo4j/tests/neo4j-action-constraint/neo4j-action-constraint-validate.hpl
new file mode 100644
index 0000000000..f54dee4942
--- /dev/null
+++
b/integration-tests/neo4j/tests/neo4j-action-constraint/neo4j-action-constraint-validate.hpl
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+ <info>
+ <name>neo4j-action-constraint-validate</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <pipeline_version/>
+ <pipeline_type>Normal</pipeline_type>
+ <parameters>
+ </parameters>
+ <capture_transform_performance>N</capture_transform_performance>
+
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+ <created_user>-</created_user>
+ <created_date>2022/12/01 09:41:25.696</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2022/12/01 09:41:25.696</modified_date>
+ </info>
+ <notepads>
+ </notepads>
+ <order>
+ <hop>
+ <from>Query constraints</from>
+ <to>Validate</to>
+ <enabled>Y</enabled>
+ </hop>
+ </order>
+ <transform>
+ <name>Query constraints</name>
+ <type>Neo4jCypherOutput</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <batch_size>1</batch_size>
+ <connection>Test</connection>
+ <cypher>show constraints yield *</cypher>
+ <cypher_from_field>N</cypher_from_field>
+ <mappings>
+</mappings>
+ <read_only>Y</read_only>
+ <retry>N</retry>
+ <returning_graph>N</returning_graph>
+ <returns>
+ <return>
+ <name>name</name>
+ <source_type>String</source_type>
+ <type>String</type>
+ </return>
+ <return>
+ <name>type</name>
+ <source_type>String</source_type>
+ <type>String</type>
+ </return>
+ <return>
+ <name>entityType</name>
+ <source_type>String</source_type>
+ <type>String</type>
+ </return>
+ <return>
+ <name>labelsOrTypes</name>
+ <source_type>List</source_type>
+ <type>String</type>
+ </return>
+ <return>
+ <name>properties</name>
+ <source_type>List</source_type>
+ <type>String</type>
+ </return>
+ <return>
+ <name>createStatement</name>
+ <source_type>String</source_type>
+ <type>String</type>
+ </return>
+ </returns>
+ <unwind>N</unwind>
+ <attributes/>
+ <GUI>
+ <xloc>144</xloc>
+ <yloc>80</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>Validate</name>
+ <type>Dummy</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <attributes/>
+ <GUI>
+ <xloc>336</xloc>
+ <yloc>80</yloc>
+ </GUI>
+ </transform>
+ <transform_error_handling>
+ </transform_error_handling>
+ <attributes/>
+</pipeline>
diff --git
a/integration-tests/neo4j/tests/neo4j-action-cypher-script/neo4j-action-cypher-script-validate.hpl
b/integration-tests/neo4j/tests/neo4j-action-cypher-script/neo4j-action-cypher-script-validate.hpl
new file mode 100644
index 0000000000..2f27534be1
--- /dev/null
+++
b/integration-tests/neo4j/tests/neo4j-action-cypher-script/neo4j-action-cypher-script-validate.hpl
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+ <info>
+ <name>neo4j-action-cypher-script-validate</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <pipeline_version/>
+ <pipeline_type>Normal</pipeline_type>
+ <parameters>
+ </parameters>
+ <capture_transform_performance>N</capture_transform_performance>
+
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+ <created_user>-</created_user>
+ <created_date>2022/12/01 10:07:25.145</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2022/12/01 10:07:25.145</modified_date>
+ </info>
+ <notepads>
+ </notepads>
+ <order>
+ <hop>
+ <from>read (p:Project)</from>
+ <to>Verify</to>
+ <enabled>Y</enabled>
+ </hop>
+ </order>
+ <transform>
+ <name>Verify</name>
+ <type>Dummy</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <attributes/>
+ <GUI>
+ <xloc>368</xloc>
+ <yloc>80</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>read (p:Project)</name>
+ <type>Neo4jCypherOutput</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <connection>Test</connection>
+ <cypher>MATCH(p:Project)
+RETURN p.id as id, p.name as name</cypher>
+ <cypher_from_field>N</cypher_from_field>
+ <mappings>
+</mappings>
+ <read_only>Y</read_only>
+ <retry>Y</retry>
+ <returning_graph>N</returning_graph>
+ <returns>
+ <return>
+ <name>id</name>
+ <source_type>Integer</source_type>
+ <type>Integer</type>
+ </return>
+ <return>
+ <name>name</name>
+ <source_type>String</source_type>
+ <type>String</type>
+ </return>
+ </returns>
+ <unwind>N</unwind>
+ <attributes/>
+ <GUI>
+ <xloc>128</xloc>
+ <yloc>80</yloc>
+ </GUI>
+ </transform>
+ <transform_error_handling>
+ </transform_error_handling>
+ <attributes/>
+</pipeline>
diff --git
a/integration-tests/neo4j/tests/neo4j-action-cypher-script/neo4j-action-cypher-script.hwf
b/integration-tests/neo4j/tests/neo4j-action-cypher-script/neo4j-action-cypher-script.hwf
new file mode 100644
index 0000000000..c7df7a031a
--- /dev/null
+++
b/integration-tests/neo4j/tests/neo4j-action-cypher-script/neo4j-action-cypher-script.hwf
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+ <name>neo4j-action-cypher-script</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <workflow_version/>
+ <created_user>-</created_user>
+ <created_date>2022/12/01 10:02:57.234</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2022/12/01 10:02:57.234</modified_date>
+ <parameters>
+ </parameters>
+ <actions>
+ <action>
+ <name>cleanup-database.hwf</name>
+ <description/>
+ <type>WORKFLOW</type>
+ <attributes/>
+ <run_configuration>local</run_configuration>
+ <filename>${PROJECT_HOME}/tests/shared/cleanup-database.hwf</filename>
+ <params_from_previous>N</params_from_previous>
+ <exec_per_row>N</exec_per_row>
+ <set_logfile>N</set_logfile>
+ <logfile/>
+ <logext/>
+ <add_date>N</add_date>
+ <add_time>N</add_time>
+ <loglevel>Nothing</loglevel>
+ <wait_until_finished>Y</wait_until_finished>
+ <create_parent_folder>N</create_parent_folder>
+ <run_configuration>local</run_configuration>
+ <parameters>
+ <pass_all_parameters>Y</pass_all_parameters>
+ </parameters>
+ <set_append_logfile>N</set_append_logfile>
+ <parallel>N</parallel>
+ <xloc>592</xloc>
+ <yloc>112</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>Check Neo4j Connections</name>
+ <description/>
+ <type>NEO4J_CHECK_CONNECTIONS</type>
+ <attributes/>
+ <connections>
+ <connection>Test</connection>
+ </connections>
+ <parallel>N</parallel>
+ <xloc>304</xloc>
+ <yloc>112</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>Start</name>
+ <description/>
+ <type>SPECIAL</type>
+ <attributes/>
+ <DayOfMonth>1</DayOfMonth>
+ <hour>12</hour>
+ <intervalMinutes>60</intervalMinutes>
+ <intervalSeconds>0</intervalSeconds>
+ <minutes>0</minutes>
+ <repeat>N</repeat>
+ <schedulerType>0</schedulerType>
+ <weekDay>1</weekDay>
+ <parallel>N</parallel>
+ <xloc>96</xloc>
+ <yloc>112</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>Neo4j Cypher Script</name>
+ <description/>
+ <type>NEO4J_CYPHER_SCRIPT</type>
+ <attributes/>
+ <connection>Test</connection>
+ <replace_variables>N</replace_variables>
+ <script>CREATE(p:Project { id: 1, name: "Apache Beam" })
+;
+CREATE(p:Project { id: 2, name: "Apache Spark" })
+;
+CREATE(p:Project { id: 3, name: "Apache Flink" })
+;
+CREATE(p:Project { id: 4, name: "Apache Hop" })
+;
+
+
+</script>
+ <parallel>N</parallel>
+ <xloc>304</xloc>
+ <yloc>256</yloc>
+ <attributes_hac/>
+ </action>
+ </actions>
+ <hops>
+ <hop>
+ <from>Check Neo4j Connections</from>
+ <to>cleanup-database.hwf</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>N</unconditional>
+ </hop>
+ <hop>
+ <from>Start</from>
+ <to>Check Neo4j Connections</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>Y</unconditional>
+ </hop>
+ <hop>
+ <from>cleanup-database.hwf</from>
+ <to>Neo4j Cypher Script</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>N</unconditional>
+ </hop>
+ </hops>
+ <notepads>
+ </notepads>
+ <attributes/>
+</workflow>
diff --git
a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/constraint/Neo4jConstraint.java
b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/constraint/Neo4jConstraint.java
index eb82ae6061..dba3029d17 100644
---
a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/constraint/Neo4jConstraint.java
+++
b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/constraint/Neo4jConstraint.java
@@ -147,13 +147,13 @@ public class Neo4jConstraint extends ActionBase
implements IAction {
+ constraintUpdate.getObjectProperties());
}
- cypher += " IF NOT EXISTS ON ";
+ cypher += " IF NOT EXISTS FOR ";
if (constraintUpdate.getObjectType() == ObjectType.NODE) {
// Constraint on a node
//
cypher += "(n:" + constraintUpdate.getObjectName() + ") ";
- cypher += "ASSERT ";
+ cypher += "REQUIRE ";
switch (constraintUpdate.getConstraintType()) {
case UNIQUE:
cypher += " n." + constraintUpdate.getObjectProperties() + " IS
UNIQUE ";
@@ -167,7 +167,7 @@ public class Neo4jConstraint extends ActionBase implements
IAction {
// constraint on a relationship
//
cypher += "()-[r:" + constraintUpdate.getObjectName() + "]-() ";
- cypher += "ASSERT ";
+ cypher += "REQUIRE ";
switch (constraintUpdate.getConstraintType()) {
case UNIQUE:
cypher += " r." + constraintUpdate.getObjectProperties() + " IS
UNIQUE ";