knowbi / knowbi-pentaho-pdi-neo4j-output

Pentaho Data Integration output step for Neo4J
Apache License 2.0
41 stars 19 forks source link

Cypher: when getting data from Neo4j, convert unrecognized data types to JSON #177

Open mattcasters opened 4 years ago

mattcasters commented 4 years ago

This is typically the case for complex data types like Map and List. We should try to convert those to a JSON String and return that.

mattcasters commented 4 years ago

We can introduce a general "List" and "Map" data types for the Neo4j side of things.

mattcasters commented 4 years ago

See : https://github.com/mattcasters/kettle-neo4j-core/issues/8 Added List and Map Neo4j data types which can then be used in the Neo4j Cypher step dialog

adams-wang commented 3 years ago

quick question:

Does the current version (5.0.6) support a list of string (array) upload to neo4j? There are scenarios that some multi-value information is stored as property instead of another entitiy.

mattcasters commented 3 years ago

Not yet @adams-wang but feel free to submit a feature request. Since Kettle or Hop don't support arrays we'd need to convert a String into an array somehow, perhaps comma separated or some such. Ideas are welcome.

adams-wang commented 3 years ago

Hi, i think it can be broken down to 2 steps:

  1. use normal kettle "group by" + "Concatenate strings separated by" + "array-delimiter (see below)" to construct a string for the array (multi-value);
  2. allow defining the delimiters in a kettle neo4j step, and generate the import clause accordingly.

https://neo4j.com/developer/kb/how-do-i-specify-the-field-and-array-delimiter-to-neo4j-import-as-a-ascii-character/

--delimiter Delimiter character, or 'TAB', between values in CSV data. The default option is ,. --array-delimiter Delimiter character, or 'TAB', between array elements within a value in CSV data. The default option is ;.