Csv loader

i have 2 csv files:-
1st with following columns:-
Name, Age
Deepak, 29
vishal, 24

2nd csv with following columns:-
PhoneNumber, Cellphone
123445, Apple
123679, Android.

there are millions of records and from the first csv we can to create an edge to 2nd csv row wise.
how can be this done using csv loader

Hey @Deepak_Sharma,

Did you see this: https://dgraph.io/docs/migration/loading-csv-data/#convert-csv-to-json

If so, and you’re asking for advice regarding manipulating CSV data, I’d recommend you check out all the tools available in CSVKit

what about when i have multiple types for example person is one type, address details in one type how can we create edge using csv loader.
small sample will help. struggling with the docs

Just to be clear, we don’t have a CSV loader. Dgraph supports JSON and RDF formats for loading. Maybe this thread will get you moving in the right direction: CSV importer or CSV converter to RDF - How to?

1 Like

my main issue not able to understand is how we can create edge. Do I need to create a uid if i have multiple csv and they are linked to each other ?

a small sample will really help

Yeah, I get it there isn’t much out there on this.

I created a branch in my sandbox repo that hopefully explains it to your satisfaction: GitHub - matthewmcneely/dgraph-sandbox at example/convert-and-load-csv-data

1 Like

the example are way to basic what if i have millions of records in multiple files and edge has to created between them how can we achieve that.

my simple ask is how to create edge when i have millions of records i wont be able to reference using :_tag.

need a generic solutions.

i have a data set of 53 millions records and around 300 predicates how will the linkage happen need a concrete example on that.

There is no generic solution to your problem. You’ll have to transform the raw data into something that can be imported logically.

I recommend that you take the tour https://dgraph.io/tour/… either the GraphQL path or the DQL path, whichever suits your needs. The DQL path takes you thru the import of millions of records.

1 Like