{"id":13529659,"url":"https://github.com/wadael/neoloadcsvskelgen","last_synced_at":"2025-04-01T17:30:35.000Z","repository":{"id":147051322,"uuid":"115574282","full_name":"wadael/neoloadcsvskelgen","owner":"wadael","description":"Will output a skeleton of LOAD CSV Cypher script for Neo4j, based on .... a csv file and user hints","archived":false,"fork":false,"pushed_at":"2018-03-31T15:47:50.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-02T16:35:18.138Z","etag":null,"topics":["csv","cypher","neo4j","procedure","skeleton"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wadael.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-12-28T02:03:04.000Z","updated_at":"2024-04-28T02:31:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"be472060-652a-4c83-abdd-450de663129a","html_url":"https://github.com/wadael/neoloadcsvskelgen","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadael%2Fneoloadcsvskelgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadael%2Fneoloadcsvskelgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadael%2Fneoloadcsvskelgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadael%2Fneoloadcsvskelgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wadael","download_url":"https://codeload.github.com/wadael/neoloadcsvskelgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246680156,"owners_count":20816639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","cypher","neo4j","procedure","skeleton"],"created_at":"2024-08-01T07:00:38.325Z","updated_at":"2025-04-01T17:30:34.703Z","avatar_url":"https://github.com/wadael.png","language":"Java","funding_links":[],"categories":["Import","REST API"],"sub_categories":["REST API","Other"],"readme":"# neoloadcsvskelgen  \n\n_Pronounce \"niölödsiessvìsköldjen\"._  (bless you)\n \nIt means Neo4j LOAD CSV skeleton generator\n\nThis project is a plugin for **Neo4j**, the graph database. \nIt contains a **procedure** that will, from little input, **generate** for you some **Cypher code** for importing a given **CSV file** (with headers).\n\nThis is a developer-oriented tool, you will run it once for a file, then tweak the output into a working script.   \n\n\n## Installation\nClassic: git clone the project then run \n\n    mvn clean package\n    \nafter that, copy the generated JAR _original-csvskelgen-0.0.1.jar_ found into the _target_ folder \ninto the plugins subfolder of your Neo4j server and restart your server.  \n \nYou are almost done. Some editing of *neo4j.conf* is needed.\nAt the end of the file, you need give authorizations to my package. \nAdd those lines at the end of your *neo4j.conf* file \n\n    dbms.security.procedures.unrestricted=wadael.*\n    dbms.security.procedures.whitelist=wadael.*\n     \nAnd if you have installed the Apoc plugin, then the syntax is like this\n\n    dbms.security.procedures.unrestricted=apoc.*,wadael.*\n    dbms.security.procedures.whitelist=apoc.*,wadael.*   \n   \n## Usage\nExample \n\n     CALL wadael.csvskelgen(\"/home/jerome/OpenSource/neoloadcsvskelgen/src/test/resources/guardian_most_polluting_companies_list.csv\",\"|\",4,\"Company:3\")\n\n* \"/home/jerome/OpenSource/neoloadcsvskelgen/src/test/resources/guardian_most_polluting_companies_list.csv\" is the full path to a CSV file. Unlike LOAD CSV, that procedure needs the full path \n* \"|\" is the field separator used in this file\n* 4 is the number of example values to give as a comment\n* \"Company:3\" is the hints (its more directives in fact) means use the label \"Company\" for the three next fields. Another possible value would be \"Company:3,Country:2\" meaning three first columns are for Company, the following two are for Country.\n\nFor the file [guardian_most_polluting_companies_list.csv](src/test/resources/guardian_most_polluting_companies_list.csv) that starts with \n\n    rank|company|percentage\n    1|China (Coal)|14.3\n    2|Saudi Arabian Oil Company (Aramco)|4.5\n    3|Gazprom OAO|3.9\n    4|National Iranian Oil Co|2.3\n    5|ExxonMobil Corp|2.0\n\nThe corresponding output is \n\n    USING PERIODIC COMMIT 5000 \n    LOAD CSV WITH HEADERS FROM 'file:/home/jerome/OpenSource/neoloadcsvskelgen/target/test-classes/guardian_most_polluting_companies_list.csv' AS line FIELDTERMINATOR '|'\n    CREATE (node0:Company)\n    SET node0.rank= line.`rank`// 1,2,3,4,\n    SET node0.company= line.`company`// China (Coal),Saudi Arabian Oil Company (Aramco),Gazprom OAO,National Iranian Oil Co,\n    SET node0.percentage= line.`percentage`// 14.3,4.5,3.9,2.3,\n\nShould you not want to have examples of values, use 0.\nExamples values are here to help you name your properties correctly.\n\nOf course, the generated code can be modified at will. _It must be_. \nThe generated skeleton is for helping and avoiding typos, a clean basis for your import script.    \n\nCopy/paste it in your favorite text editor and rename the nodes to something meaningful for you.\nAlso, check if you allow CSV files to be loaded from anywhere or just from the $NEO_HOME/import folder (default afaik) \n\nLet me kindly remind you to create the necessary constraints before to run your import.\n\n\nThis project has been motivated \nby a 100-column CSV file I use in my lectures. \nIt tends to scare :scream: students although they just have to pick some fields for an exercise.\n\n\n## Todo list ##\n - [ ] propose the Cypher code for constraint creation, as comment\n - [ ] do some syntax checking on the label names like enforcing camel case.\n - [ ] use something more meaningful that node0, node1, etc ...\n - [X] Add advertisement for my book **\"Learning Neo4j 3.x\"** Check it out: on [PacktPub](https://www.packtpub.com/big-data-and-business-intelligence/learning-neo4j-3x-second-edition?referrer=wadael), on [Amazon.com](https://www.amazon.com/Learning-Neo4j-3-x-performance-visualization/dp/1786466147)\n - [ ] Use anti-single quote syntax like label.\\`field name` only when needed\n - [ ] find an idea to automagically set the identifier for each label\n - [ ] handle CSV files without headers\n\n\n## Cookbook ##\nSee [cookbook.md](./cookbook.md) \n\n## Misc ##\nThe given pronounciation is a joke.\nHave you bought my book ? Please leave a comment on the website where you bought it.\n\nIs this project useful for you ? Send a message ! \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwadael%2Fneoloadcsvskelgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwadael%2Fneoloadcsvskelgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwadael%2Fneoloadcsvskelgen/lists"}