Hi Gianpaolo, Have you created indexes against Movies.id and Users.id? Lvc@
On 23 March 2015 at 16:40, Gianpaolo Altamura <[email protected]> wrote: > I have an csv > > ratings.dat (http://files.grouplens.org/datasets/movielens/ml-100k.zip) > that contains this fields: > > userID movieID rating > 1 1 5 > 2 1 4 > > > I imported with ETL the user class and movie class now i want to create > with ratings.csv edges (User->Movies with property rating). > > > How i can use ETL to import this edges? > > > I have tried with this, but is very very slow and it don't work: > > { > "config": { > "log": "debug", > "parallel": false > }, > "source": { > "file": { > "path": "D:\\ETL\\ratings.dat" > } > }, > "extractor": { > "row": { > } > }, > "transformers": [{ > "csv": { > "separator": "^", > "columnsOnFirstLine": false, > "columns": ["userId:integer", > "movieId:integer", > "rating:integer", > "timestamp:datetime"] > } > }, > { > "command": { > "command": "create edge rated from (select from Users where id > =$input.userId) to (select from Movies where id = $input.movieId) set > ratings = $input.ratings , rating_date = $input.timestamp", > "output": "edge" > } > }], > "loader": { > "orientdb": { > "dbURL": "remote:localhost/MovieRatings", > "dbType": "graph", > "standardElementConstraints": false, > "classes": [{ > "name": "rated", > "extends": "E" > }] > } > } > } > > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
