neo4j-contrib/neo4j-etl

Is there a way to strip some chars before loading

aonamrata opened this issue · 0 comments

This is continuation from #22
I have the latest version and still get this error. So I tried doing this in mapping.json file

{
      "name":"NODE_artrelationsauth0.artistinfo_ec207b75-1927-4bfd-942a-f0d69bcbe393",
      "schema":"neo4j_mapping",
      "graph-object-type":"Node",
      "sql":"SELECT `neo4j_mapping`.`artist_info`.`artist_id` AS `artist_id`, REPLACE(`neo4j_mapping`.`artist_info`.`name`, '\\', '') AS `name`, \"Artist\" AS `_NODE_LABEL_` FROM `neo4j_mapping`.`artist_info`",
      "mappings":[
        ...... ........... 
        {
            "column":{
               "type":"SimpleColumn",
               "role":"Data",
               "table":"artist_info",
               "schema":"neo4j_mapping",
               "name":"name",
               "alias":"name",
               "sql-data-type":"VARCHAR",
               "column-value-selection-strategy":"SelectColumnValue"
            },
            "field":{
               "type":"Data",
               "name":"name",
               "neo4j-data-type":"String",
               "is-array":false
            }
         },

and run it from cli using cmd

./bin/neo4j-etl export --mapping-file "D:\orchardws/mysql_neo4j_mapping2.json"

but that did not work. It did not insert any nodes to DB.