2018/12/6 CS 411 (188 unread)
https://piazza.com/class/jl5z3qwqna71lp?cid=812 1/1
note 68 views
Updated 1 day ago by
Tips for Neo4j on Windows (it runs like a turtle)
Put the CSVs in D:\UIUC\Neo4j\neo4jDatabases\database-8f1fffd6-8d41-4a99-baaa-13348fed363f\installation-3.4.9\import
[ obviously, change this part ]
Load your csv in by:
LOAD CSV WITH HEADERS FROM “file:///business.csv” AS line WITH line
CREATE …
RETURN line.business_id (<- this will return all the business_id in the business.csv)
Start your work ...
*If an error related to quotation marks occurs when you insert in the reviews, try to use your excel to open review.csv and delete the "text" column [the 500k review.csv sucks]
*If an error related to max_heap occurs, follow the followup or:
Allocate at least 2G of max heap memory by changing the file:
D:\UIUC\Neo4j\neo4jDatabases\database-8f1fffd6-8d41-4a99-baaa-13348fed363f\installation-3.4.9\conf\neo4j.conf
Ctrl-F search of "1G" and change it to the largest number you could afford [the 500k review.csv sucks again]
*toInt() your attributes so that you could aggregate on them
*Avoid using MERGE as much as possible, it takes so long.
*When creating users, use Excel to remove duplicate the review.csv and save as user.csv then use CREATE
hw5
~ An instructor ( ) thinks this is a good note ~Amirhossein Aleyasen
Zhonghao Pan
followup discussions for lingering questions and comments
Resolved Unresolved
Resolved Unresolved
1 day ago
Adding USING PERIODIC COMMIT before the `LOAD CSV ...` will help to prevent out of memory error.
USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM "file:///business.csv" AS line WITH line
CREATE ...
RETURN line.business_id (<- this will return all the business_id in the business.csv)
Amirhossein Aleyasen
1 day ago
I m not sure what is users for in this part? It is also stated in the hm5 handout.
Anonymous
1 day ago List of Distinct UserID, since you can't group by in Neo4j, it's important to keep the set of users here.Zhonghao Pan