Use Attributes of the Current Entity
A given SemQL clause is expressed for a given entity. For example, an enricher, a validation or a filter is performed on a pre-defined entity. Such a clause always has access to the attributes of this entity. These attributes may be simple or complex attributes.
Simple attributes can be accessed using their Name.
FirstName returns the value of the FirstName simple attribute of the current entity (Employee).
Complex attributes can be accessed using their Attribute Name. This returns the value of the complex attribute in the format of the corresponding complex type’s Display Name.
The SimpleAddressType complex type is defined with a display type that shows the Address, City and Country definition attributes separated by a space. This type is used for the
InputAddress attribute of the Customer entity. The
qualified name therefore returns a string containing
<Address> <City> <Country> value for each Customer.
It is also possible to retrieve the value of each definition attribute of a complex type by prefixing this definition attribute name by the name of the complex attribute.
The SimpleAddressType complex type includes the Country
definition attribute. This type is used for the InputAddress attribute of the Custome entity. The
InputAddress.Country qualified name therefore returns the Country stored in the InputAddress complex type value for each Customer.
SemQL exposes several ID attributes to identify a record at certain phases in the certification process.
A customer golden record is identified by the value in the
Each master record consolidated into this golden is identified by the
The table below lists the attributes representing a record ID and the value they take depending on the data access view. In this table,
<IDAttribute> refers to the name of the ID attribute of the entity.
The ID of the golden record or ID of the golden record related to the current record if any. This attribute is not available for basic entities.
For fuzzy matched entities, this attribute is completed by the following attributes that track changes due to duplicates management operations:
Record Source ID
The ID of the source record. This attribute is available only for views exposing master or source records, for fuzzy matched entities.
The Code of the publisher of the source record. This attribute is available only for views exposing master or source records for fuzzy or ID matched matched.
The ID of the current record. Its value depends on the view:
SemQL exposes multiple attributes representing a related (parent) record ID at certain phases of the certification process.
The table below lists the various attributes representing a related record ID the value they take depending on the data access view. In this table,
<ForeignAttribute> refers to the name of the foreign attribute in the reference.
Referenced Record Source ID
The ID of the referenced record. This attribute is available when referring to fuzzy matched entities.
Referenced Record Publisher
The code of the publisher of referenced record. This attribute is available when referring to fuzzy matched entities.
Referenced Record ID
The ID of the referenced record. Its value depends on the referenced record type: When referencing a golden record or a basic entity record it exposes the ID of the referenced golden record.
In the forms and collections, this attribute returns a pointer to the referenced record.
You can use it as is in a form attribute to display the reference in a user-friendly format — like a hyperlink of a chip — using the format defined in a display card configured for the referenced entity.
When using this attribute in SemQL expressions, the value returned is the primary text of the referenced entity’s default display card.
|In addition to related record foreign IDs, you can also access their attributes.
Built-in attributes are provided by Semarchy xDM to support the certification process. They appear in addition to the attributes designed in the data model.
Data is accessed or manipulated using SemQL via a data access view.
A data access view represents the data at a particular phase of its lifecycle in the data hub. For example, Golden Data, Master Data, Source Error, etc. Views are available depending on the type of the entity. For example, the Master Data view does not exist for a basic entity.
Each view is identified by an alias (GD for Golden Data, SE for source error, etc). This alias is used in the REST API to query this view, and as a prefix for the physical table containing this view’s data, if such a table exists.
|The complete list of data access views with their description is available in Data Access Views, Attributes and Lineage
Available attributes depend on the data access view running the SemQL expression and on the type of entity (basic, ID of fuzzy matched).
For example, a clause that involves the Source Data view (for example, an enricher on source data) will support built-in attributes such as the
SourceID (ID of the source record) or the
PublisherID (Code of the application that published the source record). On Golden Records - which are not directly related to one source - these built-in attributes no longer make sense.
Built-in attributes are available depending on the type of entity (basic, ID or fuzzy matched), and view being used.
|The complete list of built-in attributes with their description and views is available in Data Access Views, Attributes and Lineage
|The SemQL Editor automatically lists the attributes available depending on the situation. Use this editor to make sure to use only the correct attributes.