This is my load command:
这是我的加载命令:
neo4j-sh (?)$ USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM "file:/Users/levi/data/woka-data/atom_description.csv" AS row
CREATE (:Description {language: row.content.language, value: row.content.value, woka_id: row.woka_id});
This are the first couple rows in my CSV file (first line is the header): content.language,content.value,woka_id
这是我的CSV文件中的第一行(第一行是标题):content.language,content.value,woka_id
"eng","This handbook is the first of its kind to discuss infection control guidelines that directly relate to surgical environments. It is particularly useful to nurses who need to meet OSHA and JCAHO requirements for practice in perioperative, PACU, ambulatory, and endoscopy settings. Procedure guidelines are concisely described and followed by rationales referenced to AORN standards, CDC guidelines, and other resources.","97800000003300000000"
"eng","Practitioners and academics dealing with the Middle East can turn to the Yearbook of Islamic and Middle Eastern Law for an instant source of information on the developments over an entire year in the region. The Yearbook covers Islamic and non-Islamic legal subjects, including the laws themselves, of some twenty Arab and other Islamic countries. The publication's practical features include: <br>- articles on current topics, <br>-country surveys reflecting important new legislation and amendments to existing legislation per country, <br>- the text of a selection of documents and important court cases, <br>- a Notes and News section, and<br>- book reviews. <br>","97800000222400000000"
This is what was effectively loaded in the db:
这是在db中有效加载的内容:
neo4j-sh (?)$ match (n: Description) return (n) limit 10;
+------------------------------------------------+
| n |
+------------------------------------------------+
| Node[26293467]{woka_id:"97800000003300000000"} |
| Node[26293468]{woka_id:"97800000222400000000"} |
| Node[26293469]{woka_id:"97800000255240000000"} |
| Node[26293470]{woka_id:"97800002099930000000"} |
| Node[26293471]{woka_id:"97800002966650000000"} |
| Node[26293472]{woka_id:"97800010161180000000"} |
| Node[26293473]{woka_id:"97800010161320000000"} |
| Node[26293474]{woka_id:"97800010161560000000"} |
| Node[26293475]{woka_id:"97800010162170000000"} |
| Node[26293476]{woka_id:"97800010162310000000"} |
+------------------------------------------------+
10 rows
27 ms
What I am missing here?
我在这里缺少什么?
1 个解决方案
#1
You should not have dots in the csv's header field. Replace them e.g. by underscore, both in the header line and in the LOAD CSV
command.
你不应该在csv的头字段中有点。替换它们例如通过下划线,在标题行和LOAD CSV命令中。
#1
You should not have dots in the csv's header field. Replace them e.g. by underscore, both in the header line and in the LOAD CSV
command.
你不应该在csv的头字段中有点。替换它们例如通过下划线,在标题行和LOAD CSV命令中。