Skip to main content

Data References

One document can refer to data stored in another document.

To identify the other document SyncHive uses data references. An example is below:

{
"@type": "DataReference",
"schemaName": "limber",
"shapeName": "Product",
"externalIdentities": [
{
"integrationKey": "SapS4",
"externalId": "30008412"
}
]
}

This reference refers to the document containing the given external identity.

A data reference must include:

  • the schema (schemaName)
  • the class (shapeName)

of the document being referenced.

A data reference must also include at least one of three ways of identifying the document being referred to:

  • an external identity (as in the above example)
  • a SyncHive ID, represented by an IRI
  • a list of keys, represented by a list of key-value maps – for example a product SKU declared an alternate key.

Below is an example of a data reference that uses the SyncHive ID, represented as an IRI, to identify the document being referred to:

{
"@type": "DataReference",
"schemaName": "limber",
"shapeName": "CurrencyUnit",
"iri": "https://schema.limbergraph.com/limber/CurrencyUnit#NZD"
}

The IRI https://schema.limbergraph.com/limber/CurrencyUnit#NZD identifies the document for the NZD currency unit.

A data reference can include multiple ways of identifying the referred to document – for example:

  • multiple external identities, or
  • an IRI and multiple external identities
  • etc.

SyncHive will try them all to find the document.

A connector is free to choose any of the three options for specifying data references – whatever is convenient for the connector.