区分Neo4j查询以获取不同的数据文件 [英] Differentiating Neo4j queries for different data files

查看:69
本文介绍了区分Neo4j查询以获取不同的数据文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Neo4j 2.1.2.我的查询是我有3个结构相同但数据不同的csv文件,例如csv1,csv2,csv3.我在Neo4j上向csv1加载了节点和关系信息.同样,我以与第一个csv相同的节点名称和关系名称加载了csv2,并且我也对csv2做了同样的事情.

I'm using Neo4j 2.1.2. My query is that I have a 3 csv files with the same structure but with different data, say csv1, csv2, csv3. I loaded the csv1 with node and relationship information on Neo4j. Again I loaded csv2 with the same nodename and relationship name as the 1st csv and I did the same thing for csv2 as well.

因此,当我在不使用LOAD CSV命令的情况下触发查询时,它将从哪个文件中获取数据?每当我们要执行新查询时,是否需要每次都添加LOAD CSV命令.那么查询如何知道应该仅从csv2中获取数据?

So when I fire the query without LOAD CSV command, then from which file will it file fetch the data? Do we need to add LOAD CSV command each time whenever we want to execute the new query. So how would the query know that the data should be fetched from csv2 only?

谢谢, Shree

推荐答案

Neo4j是一个图形数据库.

Neo4j is a graph database.

因此,在运行create/merge语句后,数据就位于数据库中,并且您不需要那里的CSV文件.

So after you have run your create / merge statements the data is inside the database and you don't need the CSV files from there.

如果每个CSV文件中都有特定的内容,则它必须是图形模型的一部分,以便可以对其进行查询.

If there is something specific in every CSV file, that needs to be part of your graph model to make it possible to query it.

请在问题中添加您的域/图形模型,然后我们可以帮助您对图形进行建模,从而可以查询数据库的某些部分.

Please add your domain / graph model to the question, then we can help you with modeling you graph to make it possible to query parts of your database.

这篇关于区分Neo4j查询以获取不同的数据文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆