Basic Types¶
Fundamental type definitions used throughout OpenMetadata schemas.
Overview¶
Basic types are the building blocks for all OpenMetadata schemas. They provide standardized, reusable type definitions.
String Types¶
UUID¶
Definition: type/basic.json#/definitions/uuid
RFC 4122 compliant universally unique identifiers:
{
"type": "string",
"format": "uuid",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
}
Usage: Entity IDs, references
Email¶
Definition: type/basic.json#/definitions/email
RFC 5322 email addresses:
Markdown¶
Definition: type/basic.json#/definitions/markdown
CommonMark formatted text for rich descriptions:
URI¶
Definition: type/basic.json#/definitions/href
HTTP/HTTPS URIs:
Temporal Types¶
Timestamp¶
Definition: type/basic.json#/definitions/timestamp
ISO 8601 timestamps:
Example: 1704067200000 (2024-01-01T00:00:00Z)
Date¶
Definition: type/basic.json#/definitions/date
ISO 8601 dates:
Example: "2024-01-01"
Time¶
Definition: type/basic.json#/definitions/time
ISO 8601 times:
Example: "14:30:00"
Duration¶
Definition: type/basic.json#/definitions/duration
ISO 8601 durations:
Example: "P1DT12H30M" (1 day, 12 hours, 30 minutes)
Numeric Types¶
Integer¶
Standard JSON integer:
Number¶
JSON number (float/double):
Boolean¶
Standard JSON boolean:
Expression Types¶
SQL Expression¶
Definition: type/basic.json#/definitions/sqlQuery
SQL query strings:
SQL Function¶
SQL function expressions:
Entity Links¶
Entity Link¶
Definition: type/basic.json#/definitions/entityLink
Links to specific entities or entity fields:
Format: <#E::{entityType}::{fqn}[::{field}::{fieldValue}]>
Enum Types¶
Style Enums¶
Constrained string values:
Validation Patterns¶
Name Pattern¶
Valid entity names:
FQN Pattern¶
Fully qualified names:
Best Practices¶
- Use Standard Types: Always reference basic types instead of redefining
- Validation: Leverage format and pattern validations
- Constraints: Add min/max length where appropriate
- Documentation: Document custom constraints