# Can I get uid information or predicate information of this node through the key whitch I defined

**URL:** <https://discuss.dgraph.io/t/can-i-get-uid-information-or-predicate-information-of-this-node-through-the-key-whitch-i-defined/5748>\
**Category:** Users\
**Tags:** mutation\
**Created:** [January 6, 2020, 1:00am UTC](https://discuss.dgraph.io/t/can-i-get-uid-information-or-predicate-information-of-this-node-through-the-key-whitch-i-defined/5748 "2020-01-06T01:00:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bqf9979](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/bqf9979/32/2393_2.png) [@bqf9979](https://discuss.dgraph.io/u/bqf9979)\
**Post date:** [January 6, 2020, 1:00am UTC](https://discuss.dgraph.io/t/can-i-get-uid-information-or-predicate-information-of-this-node-through-the-key-whitch-i-defined/5748/1 "2020-01-06T01:00:58Z")

</div>

When I mutation it, I use “\_: XXX” as the uid insert. XXX is the only value named for me. Can I get uid information or predicate information of this node through this key,thanks !

---

<div class="post-metadata">

**Author:** ![purist180](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/purist180/32/2386_2.png) [@purist180](https://discuss.dgraph.io/u/purist180)\
**Post date:** [January 6, 2020, 1:21am UTC](https://discuss.dgraph.io/t/can-i-get-uid-information-or-predicate-information-of-this-node-through-the-key-whitch-i-defined/5748/2 "2020-01-06T01:21:36Z")

</div>

you can add another mutation like

```auto
 _:XXX <external_id> "XXX" .

```

Then you can get uid of this node by seraching \<external\_id\>

```auto
{
   q(func: eq(<external_id>, XXX)) {
         uid
         ....
    }
}

```

---

<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:** [January 6, 2020, 3:16am UTC](https://discuss.dgraph.io/t/can-i-get-uid-information-or-predicate-information-of-this-node-through-the-key-whitch-i-defined/5748/3 "2020-01-06T03:16:52Z")

</div>

> [@bqf9979](#):
>
> “\_: XXX”

This is a blank identifier. This means that once you mutate it and finish the transaction, this identifier if used again, will be another UID.

So, what you can do is like Zhao Lin exemplified. Or use Upsert Block to find the UID for you and mutate it.

> **[Get started with Dgraph](https://dgraph.io/docs)**
>
> From learning the basics of graph databases to advanced functions and capabilities, Dgraph docs have the information you need.

> **[Get started with Dgraph](https://dgraph.io/docs)**
>
> From learning the basics of graph databases to advanced functions and capabilities, Dgraph docs have the information you need.

Cheers.

---

<div class="post-metadata">

**Author:** ![purist180](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/purist180/32/2386_2.png) [@purist180](https://discuss.dgraph.io/u/purist180)\
**Post date:** [January 6, 2020, 4:49am UTC](https://discuss.dgraph.io/t/can-i-get-uid-information-or-predicate-information-of-this-node-through-the-key-whitch-i-defined/5748/4 "2020-01-06T04:49:43Z")

</div>

A tutorial of UPSERT like this maybe helpful

[![](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/9/9a1cae2a54a3b211feaffbb1d3fa2470d62237a2.jpeg "Getting started with Dgraph #4: string internationalization") ](https://www.youtube.com/watch?v=_lDE9QXHZC0)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/2/2b38fdece2abe5814f2e51bee69d1e67fc304b0a.png) [@system](https://discuss.dgraph.io/u/system)\
**Post date:** [February 5, 2020, 4:49am UTC](https://discuss.dgraph.io/t/can-i-get-uid-information-or-predicate-information-of-this-node-through-the-key-whitch-i-defined/5748/5 "2020-02-05T04:49:53Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
