Context specification YAML reference (in preview)

Every context specification has a YAML representation that contains all of its mappings. Use this reference when you review a full context specification or edit many mappings at once in the YAML view. You can also use it when you paste a configuration from another context specification. You don't need to write YAML to create a context specification, because the mapping builder and the YAML always stay in sync.

Field node structure

The YAML document is a map. Each key is the name of an output field, and each value is a field node.

Copy
field_name:
  collibra_mapping:        # how the field gets its value
    <mapping block>
  extract:                 # optional child fields, for wrappers and traversals
    <child field nodes>

Mapping blocks

Each collibra_mapping block contains the keys of one mapping type.

Mapping type Keys
Property property, and optionally transform.
Attribute attribute (the public ID of the attribute type), and optionally cast_to, is_list, and transform.
Auto auto: "all", and optionally include or exclude with a list of public IDs.
Static static_value, with a string, number, Boolean, null, list, or object.
List wrapper wrapper: "list", with child fields under extract_items.
Object wrapper wrapper: "object", with child fields under extract.
Traversal path with a list of relations, and optionally is_list. Values to read go under extract.
Coalesce coalesce with an ordered list of collibra_mapping blocks.
Template template with {placeholder} markers, and vars with one collibra_mapping block for each placeholder.

The following example shows each mapping block:

Copy
# Property
collibra_mapping:
  property: "name"
  transform: ["trim", "lowercase"]
 
# Attribute
collibra_mapping:
  attribute: "<publicId>"
  cast_to: "string"
  is_list: true
  transform: ["trim"]
 
# Auto
collibra_mapping:
  auto: "all"
  exclude: ["<publicId>"]
 
# Static
collibra_mapping:
  static_value: "1.0.0"
 
# Object wrapper or list wrapper
collibra_mapping:
  wrapper: "object"
 
# Traversal
collibra_mapping:
  is_list: true
  path:
    - relation: "<publicId>"
      direction: "OUTGOING"
      target: "<publicId>"
      filter:
        conditions:
          - id: "A"
            property: "name"
            operator: "contains"
            value: ["search"]
        formula: "A"
    - complex_relation: "<publicId>"
      relation: "<publicId>"
      direction: "OUTGOING"
extract:
  collibra_mapping:
    property: "name"
 
# Coalesce
collibra_mapping:
  coalesce:
    - collibra_mapping:
        attribute: "<publicId>"
    - collibra_mapping:
        property: "name"
    - collibra_mapping:
        static_value: "default"
 
# Template
collibra_mapping:
  template: "{db}.{schema}.{table}"
  vars:
    db:
      collibra_mapping:
        property: "domain.community.name"
    schema:
      collibra_mapping:
        property: "domain.name"
    table:
      collibra_mapping:
        property: "name"

Traversal keys

Key Description
relation The public ID of a standard or derived relation type.
direction OUTGOING or INCOMING.
target Optional. The public ID of the target asset type.
filter Optional. A relation filter with conditions and an optional formula.
complex_relation The public ID of a complex relation type. Use with an optional relation and direction for the entry relation.

Property keys

UI label YAML key
ID id
Display Name name
Full Name full_name
Status Name status.name
Status ID status.id
Asset Type Name type.name
Asset Type ID type.id
Domain Name domain.name
Domain ID domain.id
Community Name domain.community.name
Community ID domain.community.id

Cast types and formatting keys

Key Values
cast_to string (default), boolean, number, date.
transform

trim, lowercase, uppercase, snake_case, camel_case, kebab_case.

You can combine trim with one case value.

Validation indicators

Collibra checks the configuration while you edit it. The schema tree shows the status of each field.

Indicator Meaning
Green check mark The field has a valid mapping.
Yellow warning The mapping has a structural problem, such as a child field under a parent that is not a container.
Red error The mapping refers to an attribute type, relation type, asset type, domain, or status that no longer exists in Collibra.

In the YAML view, references to items that no longer exist appear in an error banner with their public IDs. Other YAML errors appear in a list below the editor, with the path to each field and a description. If the target asset type of a context specification no longer exists, the Test button is unavailable until you select a valid target asset type.

Output rules

Rule Description
Format The output is a YAML document.
Empty values Fields without a value don't appear in the output.
Storage Collibra doesn't save the output to the asset or to an external system.

Helpful resources