# How to divide big RDF file to multiple small files & use embedding?

**URL:** <https://discuss.dgraph.io/t/how-to-divide-big-rdf-file-to-multiple-small-files-use-embedding/4060>\
**Category:** Dgraph\
**Created:** [February 18, 2019, 4:30pm UTC](https://discuss.dgraph.io/t/how-to-divide-big-rdf-file-to-multiple-small-files-use-embedding/4060 "2019-02-18T16:30:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![samadadi](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@samadadi](https://discuss.dgraph.io/u/samadadi)\
**Post date:** [February 18, 2019, 4:30pm UTC](https://discuss.dgraph.io/t/how-to-divide-big-rdf-file-to-multiple-small-files-use-embedding/4060/1 "2019-02-18T16:30:33Z")

</div>

Suppose I have a big RDF file, called “A”. I divide “A” to small “B” & “C” files. The file “C” depends on file “B” . So The main question is: How to use file “B” in file “C” & import file “C” in Dgraph database? Is this possible at all? please help me.

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [February 18, 2019, 5:46pm UTC](https://discuss.dgraph.io/t/how-to-divide-big-rdf-file-to-multiple-small-files-use-embedding/4060/2 "2019-02-18T17:46:48Z")

</div>

You can use [https://docs.dgraph.io/deploy#bulk-loader](https://docs.dgraph.io/deploy#bulk-loader) or [https://docs.dgraph.io/deploy#live-loader](https://docs.dgraph.io/deploy#live-loader)  
Both will use all RDFs in a given path. But this in a single bulk/batch. If you do loads on distinct moments they will not relate.

---

<div class="post-metadata">

**Author:** ![samadadi](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@samadadi](https://discuss.dgraph.io/u/samadadi)\
**Post date:** [February 18, 2019, 5:56pm UTC](https://discuss.dgraph.io/t/how-to-divide-big-rdf-file-to-multiple-small-files-use-embedding/4060/3 "2019-02-18T17:56:47Z")

</div>

Hi, How to create gzipped file from multiple RDF files? Should I just compress them to “.tar.gz” or “.zip” file? What about the relation between rdf files. How to make those files to relate to each other?

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [February 18, 2019, 6:40pm UTC](https://discuss.dgraph.io/t/how-to-divide-big-rdf-file-to-multiple-small-files-use-embedding/4060/4 "2019-02-18T18:40:31Z")

</div>

You don’t need to create any gzipped file. If you use “dot” in the -r flag Dgraph will seek for RDF, GZ or any other type compatible.

e.g:

```auto
./dgraph bulk -r . -s 1million.schema --zero localhost:5080 --map_shards=4 --reduce_shards=2

```

> [@samadadi](#):
>
> What about the relation between rdf files. How to make those files to relate to each other?

Just use the same Blank node in all RDFs - check this part of the tour [A Tour of Dgraph](https://tour.dgraph.io/intro/5/)

---

<div class="post-metadata">

**Author:** ![samadadi](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@samadadi](https://discuss.dgraph.io/u/samadadi)\
**Post date:** [February 18, 2019, 6:59pm UTC](https://discuss.dgraph.io/t/how-to-divide-big-rdf-file-to-multiple-small-files-use-embedding/4060/5 "2019-02-18T18:59:57Z")

</div>

Is “-r .” recursive? I mean does this flags makes bulk loader to search inner folders?

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [February 18, 2019, 7:07pm UTC](https://discuss.dgraph.io/t/how-to-divide-big-rdf-file-to-multiple-small-files-use-embedding/4060/6 "2019-02-18T19:07:18Z")

</div>

Yes, It will seek for any RDF below that path. Including inner folders.

---

<div class="post-metadata">

**Author:** ![samadadi](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@samadadi](https://discuss.dgraph.io/u/samadadi)\
**Post date:** [February 18, 2019, 7:10pm UTC](https://discuss.dgraph.io/t/how-to-divide-big-rdf-file-to-multiple-small-files-use-embedding/4060/7 "2019-02-18T19:10:57Z")

</div>

Thank you so much for your help.
