Inheritance - abstractfactory/openmetadata GitHub Wiki

Inheritance works by augmenting parents with metadata from children.

Each parent within a hierarchy contributes metadata to children, thus allowing children to customise metadata upstream, either by overriding or appending. The concept is drawn from CSS and is more commonly known as Cascading, however the usage within Open Metadata more closely resembles that of traditional inheritance which is very similar.

Simple

In a given directory there are three metadata entries.

/projects/spiderman/shot1 -> length, description
  • length is a numerical value, an integer
  • description is text

Inheritance works by appending any metadata from parent directories. So:

/projects/spiderman -> director

Here, spiderman contains additional director. Thus, querying the contents of an inherited shot1 would result in:

length=1.87
description="Prelude to upcoming events"
director="Michael Bay"

Nested

In a more complex scenario, there may be multiple entries within a single entry. This is nesting or hierarchical entries.

/projects/spiderman -> /apps/maya/environment/PYTHONPATH
/projects/spiderman/shot1 -> /apps/maya/args/-hideConsole

Here, shot1 augments its parent spiderman metadata with an additional args entry. Thus the metadata for spiderman is:

apps/maya/environment/PYTHONPATH="/projects/spiderman/scripts"

Whereas metadata for shot1 looks like this:

apps/maya/environment/PYTHONPATH="/projects/spiderman/scripts"
apps/maya/args/-hideConsole