Book a Demo

Author Topic: Encoding EA GUID  (Read 6003 times)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Encoding EA GUID
« on: July 25, 2019, 02:03:55 am »
Is there a way to encode, using a custom code or query, the GUID generated in more user friendly format with less characters?


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Encoding EA GUID
« Reply #1 on: July 25, 2019, 02:47:49 am »
I wouldn't do that. A GUID has a defined form. See https://en.wikipedia.org/wiki/Universally_unique_identifier or RFC 4122.

q.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Encoding EA GUID
« Reply #2 on: July 25, 2019, 02:52:34 am »
I wouldn't do that. A GUID has a defined form. See https://en.wikipedia.org/wiki/Universally_unique_identifier or RFC 4122.

q.
AFIK GUIDs including those conforming to RFC 4122 can be encoded using different bases without any data loss, hence the question.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Encoding EA GUID
« Reply #3 on: July 25, 2019, 03:45:44 am »
Read the Format section in the Wiki and see if you can get happy with that.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Encoding EA GUID
« Reply #4 on: July 25, 2019, 09:29:11 am »
Is there a way to encode, using a custom code or query, the GUID generated in more user friendly format with less characters?
If you're using another tool do what you want. If you're using EA I wouldn't recommend it.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Encoding EA GUID
« Reply #5 on: July 25, 2019, 03:16:59 pm »
Depends on what you need to do with it.
If you just want to reference them in a document without using the full guid that would be feasible.

You could for example use only a part of the guid, like the last 5 characters.
There will of course be a higher risk of collisions, but it will probably still be pretty small.

With a simple query
where t_object.ea_guid like '#WC#myGUIDPart'
You could find the elements you need.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Encoding EA GUID
« Reply #6 on: July 25, 2019, 05:17:03 pm »
If you're after something like bit.ly for guids you could use scripting with a custom table.

q.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Encoding EA GUID
« Reply #7 on: July 25, 2019, 08:21:53 pm »
Thanks Geert and qwerty, we are trying to reference them in documents without having to use the full GUID, we are not intending to use encoded GUIDs for import. We would look into using the last 5 characters or do something like bit.ly.

I'll try to post an update when we reach a conclusion.