UUID
representation.identifier.uuidUniversally Unique Identifier (RFC 9562, which obsoletes RFC 4122). Versions include v1 (timestamp-based), v4 (random), v5 (name-based), and v6, v7 and v8 (time-ordered and custom layouts). Text form: 8-4-4-4-12 hex groups with hyphens; the hex digits may be upper, lower or mixed case, and lowercase is preferred.
Operations on this type: Join tables on a key
Try a value
UUID's rule accepts it.
Reads it as 550e8400-e29b-41d4-a716-446655440000
Also accepted by
- Alphanumeric Identifier
550e8400-e29b-41d4-a716-446655440000
Use it
finetype infer -i '550e8400-e29b-41d4-a716-446655440000' --mode column
# → representation.identifier.uuidSELECT ft_infer('550e8400-e29b-41d4-a716-446655440000');
-- → 'representation.identifier.uuid'CAST({col} AS UUID)Pattern
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$| Value | Length | Shape |
|---|---|---|
| 550e8400-e29b-41d4-a716-446655440000 | 36 | matches |
| 6ba7b810-9dad-11d1-80b4-00c04fd430c8 | 36 | matches |
| f47ac10b-58cc-4372-a567-0e02b2c3d479 | 36 | matches |
| 550e8400-e29b-41d4-a716-44665544000 | 35 | rejected: one character short |
Similar types
1 of the 3 other identifier types accept every one of these samples on shape alone.
- Alphanumeric Identifiermatches them by pattern
In Meridian's datasets
- ndc
spl_idconfidence 1
Background
Origin
UUIDs were originally used in the Apollo Network Computing System (NCS), later in the Open Software Foundation's Distributed Computing Environment (DCE), and then in Microsoft Windows platforms.[1] Apollo Computer's Network Computing System, which used UUIDs, was launched in 1987.[2] Microsoft Windows platforms adopted the NCS, and later the DCE, design as Globally Unique Identifiers (GUIDs) in the early nineties.[2] ISO/IEC documented the DCE design in 1996, in ISO/IEC 11578:1996.[2]
RFC 4122, A Universally Unique IDentifier (UUID) URN Namespace, was published in July 2005.[3] RFC 9562 says an ITU-T Recommendation and an ISO/IEC Standard are derived from RFC 4122.[1] RFC 9562 says the ITU-T and ISO/IEC specifications and the RFC have been aligned and are fully technically compatible.[1]
RFC 9562 gives as one of the main reasons for using UUIDs that no centralised authority is required to administer them.[1] RFC 9562 says UUIDs have gained popularity as database keys because the auto-increment schemes often used by databases do not work well in distributed applications.[1] RFC 9562 says UUID versions that are not time ordered, such as UUIDv4, have poor database-index locality.[1] UUIDv7 places a Unix timestamp in milliseconds in the most significant 48 bits of the UUID.[1] RFC 9562 says implementations should use UUIDv7 instead of UUIDv1 and UUIDv6 if possible.[1]
Use
RFC 9562 says UUIDs comprise the core identifier infrastructure for many operating systems such as Microsoft Windows and applications such as the Mozilla web browser.[1] A UUID is 128 bits long.[1] RFC 9562 calls the standard text form of a UUID the hex-and-dash string format, groups of hexadecimal characters separated by single hyphens.[1] PostgreSQL writes a UUID as a group of 8 hexadecimal digits, then three groups of 4 digits, then a group of 12 digits, for 32 digits in total.[4]
Microsoft's .NET Guid.ToString method can write a GUID as 32 digits with no hyphens, with hyphens, with hyphens enclosed in braces, or with hyphens enclosed in parentheses.[5] By default, .NET's Guid.ToString writes lowercase hexadecimal digits in groups of 8, 4, 4, 4 and 12, separated by hyphens.[5] Python's uuid module accepts a string of hex digits with or without curly braces, hyphens and a URN prefix.[6] PostgreSQL accepts UUID input surrounded by braces, or with some or all hyphens omitted.[4] PostgreSQL always outputs a UUID in the standard form.[4] When a column mixes these spellings, normalise every value to the bare hyphenated form before you compare or join on it. (Meridian's view) A 32-character hexadecimal string with no hyphens may be a UUID with its hyphens stripped, or something else entirely, so find out where it came from before you cast it. (Meridian's view)
In the text form of a UUID, the version is the hex digit after the second hyphen.[2] DuckDB retrieves the version of a UUID value with the uuid_extract_version function.[7] DuckDB retrieves the timestamp from a UUIDv7 value with the uuid_extract_timestamp function.[7] RFC 9562 advises treating UUIDs as opaquely as possible and avoiding parsing them unless absolutely necessary.[1] Look at the digit after the second hyphen to learn which version a column holds, but resist building logic that depends on what is inside the identifier. (Meridian's view)
RFC 9562 says UUIDs should be stored within database applications as the underlying 128-bit binary value where feasible.[1] RFC 9562 notes that storing UUIDs as text requires 288 bits to represent a 128-bit value.[1] DuckDB's UUID type uses 128 bits and is represented internally as HUGEINT values.[7] DuckDB prints a UUID with lowercase hexadecimal characters separated by dashes, using 36 characters in total.[7] SQL Server's uniqueidentifier data type is a 16-byte GUID.[8] SQL Server does not order uniqueidentifier values by comparing the bit patterns of the two values.[8] RFC 9562 notes that Microsoft's Component Object Model (COM) GUIDs use little-endian byte order when saved in binary, while RFC 9562 sequences all fields in big-endian format.[1] Do not expect a set of UUIDs to sort the same way in every database, and when a binary GUID from a Microsoft system turns into a different string than its source shows, suspect byte order before you suspect the data. (Meridian's view)
RFC 9562 says implementations should not assume that UUIDs are hard to guess.[1] Python's documentation notes that uuid1() may compromise privacy because it creates a UUID containing the computer's network address.[6] RFC 9562 cautions database schema designers against using name-based UUIDs as primary keys in tables.[1] PostgreSQL provides native support for generating UUIDs using the UUIDv4 and UUIDv7 algorithms.[4] DuckDB supports generating UUIDv4 and UUIDv7 identifiers.[7] Python's uuid module added UUID versions 6, 7 and 8 in version 3.14.[6]
Where you'll meet it
GOV.UK's Publishing API uses a UUID value, content_id, to identify distinct pieces of content on GOV.UK.[9] On GOV.UK, the same content_id is used for content that is available in multiple translations.[9]
Sources
- [1]RFC 9562: Universally Unique IDentifiers (UUIDs) | RFC Editorstandard
- [2]Universally unique identifier - Wikipediasecondary source
- [3]A Universally Unique IDentifier (UUID) URN Namespacestandard
- [4]PostgreSQL: Documentation: 18: 8.12. UUID Typedocumentation
- [5]Guid.ToString Method (System) | Microsoft Learndocumentation
- [6]uuid — UUID objects according to RFC 9562 — Python 3.15.0 documentationdocumentation
- [7]Numeric Types – DuckDBdocumentation
- [8]uniqueidentifier (Transact-SQL) - SQL Server | Microsoft Learndocumentation
- [9]publishing-api: Publishing API's Model - GOV.UK Developer Documentationorganisation
How it's detected
UUID is a universal identifier used in database design far beyond technology contexts. DuckDB UUID type accepts standard 8-4-4-4-12 format. Also accepts without hyphens via UPPER() or normalization.
Schema
https://meridian.online/schemas/representation.identifier.uuid · Frictionless type string · uuid
finetype taxonomy representation.identifier.uuid -o json-schema