# Init loading data and upsert

**URL:** <https://discuss.dgraph.io/t/init-loading-data-and-upsert/19368>\
**Category:** Dgraph\
**Tags:** area:bulk-loader, area:live-loader\
**Created:** [June 21, 2024, 7:22am UTC](https://discuss.dgraph.io/t/init-loading-data-and-upsert/19368 "2024-06-21T07:22:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CyberSputnik](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/cybersputnik/32/11630_2.png) [@CyberSputnik](https://discuss.dgraph.io/u/CyberSputnik)\
**Post date:** [June 21, 2024, 7:22am UTC](https://discuss.dgraph.io/t/init-loading-data-and-upsert/19368/1 "2024-06-21T07:22:34Z")

</div>

Hello everyone!  
Deployed dgraph in docker, version 23.1.0 (3 zeros, 6 alphas).  
I upload the initial data via graph bulk  
command:  
`dgraph bulk -f data.rdf -s schema.txt --map_shards=4 --reduce_shards=2 --http localhost:8000 --zero=localhost:5080`

**schema.txt**

```auto
xid: string @index(exact) @upsert .
User.name: string @index(hash) .
User.follows: [uid] @reverse .
User.transaction: [uid] @reverse .
User.pos: [uid] @reverse .

```

**data.rdf**

```auto
_:user_001 <xid> "_:user_001" .
_:user_001 <User.name> "user_001" .
_:user_001 <User.follows> _:user_002 .
_:user_001 <User.pos> _:user_003 .

_:user_002 <xid> "_:user_002" .
_:user_002 <User.name> "user_002" .
_:user_002 <User.transaction> _:user_003 (count=10, amount=5600) .
_:user_002 <User.pos> _:user_003 .
_:user_002 <User.follows> _:user_003 .

_:user_003 <xid> "_:user_003" .
_:user_003 <User.name> "user_003" .
_:user_003 <User.follows> _:user_005 .

_:user_004 <xid> "_:user_004" .
_:user_004 <User.name> "user_004" .
_:user_004 <User.follows> _:user_005 .

_:user_005 <xid> "_:user_005" .
_:user_005 <User.name> "user_005" .
_:user_005 <User.follows> _:user_003 .
_:user_005 <User.follows> _:user_001 .

```

I copy the received data to the alpha nodes. Then start the cluster.  
At this stage, everything is fine, I can see the data through ratel.

Next, I’m trying to update the data  
uploading data\_upd.rdf and schema.txt to alpha1

**data\_upd.rdf**

```auto
_:user_002 <User.name> "user_002_new_name" .
_:user_002 <User.transaction> _:user_003 (count=20, amount=9999) .
_:user_002 <User.pos> _:user_003 .
_:user_002 <User.follows> _:user_005 .

```

schema.txt is the same

and run command dgraph live:  
`dgraph live --alpha alpha1:9080,alpha2:9080,alpha3:9080,alpha4:9080,alpha5:9080,alpha6:9080 -z zero1:5080 -f data_upd.rdf -s schema.txt -U xid`

**this output command:**  
_root@1af7d009dfba:/dgraph# dgraph live --alpha alpha1:9080,alpha2:9080,alpha3:9080,alpha4:9080,alpha5:9080,alpha6:9080 -z zero1:5080 -f data\_upd.rdf -s schema.txt -U xid_  
\*I0621 06:58:53.203852 63 init.go:85] \*

_Dgraph version : v23.1.0_  
_Dgraph codename : dgraph_  
_Dgraph SHA-256 : 2b0d2fb977807f9d681c3a8e5f67a6fb133c99c772009158107aa6b1ac4cbd10_  
_Commit SHA-1 : 2b18d19_  
_Commit timestamp : 2023-08-17 13:27:10 -0500_  
_Branch : HEAD_  
_Go version : go1.19.12_  
_jemalloc enabled : true_

_Running transaction with dgraph endpoint: alpha1:9080,alpha2:9080,alpha3:9080,alpha4:9080,alpha5:9080,alpha6:9080_

_Processing schema file “schema.txt”_  
_Processed schema file “schema.txt”_

_Found 1 data file(s) to process_  
_Processing data file “data\_upd.rdf”_  
\*Number of TXs run : 0 \*  
_Number of N-Quads processed : 0_  
_Time spent : 41.222609ms_  
_N-Quads processed per second : 0_

The data is not updated. If I remove the -U key, then new nodes are expected to be created.  
Where do I make a mistake?
