Skip to content

DataObjectMapping

Namespace: DataWarehouseAutomation.DwaModel
Assembly: DataWarehouseAutomation.dll

The mapping between a source and target data set / table / file.

The DataObjectMapping is the element that defines an individual source-to-target mapping / ETL process. It is a mapping between a source and target object - referred to as DataObjects. The DataObject is in fact a reusable definition in the Json schema.

This definition is used twice in the DataObjectMapping: as the *SourceDataObjects* and as the *TargetDataObject* - both instances/lists of , implemented as or .

The other key component of a DataObjectMapping is the *DataItemMapping*, which describes the column-to-column (or transformation-to-column). The SourceDataObject, TargetDataObject and DataItemMapping are the mandatory components of a DataObjectMapping.There are many other attributes that can be set, and there are mandatory items within the DataObjects and DataItems.These are all described in the Json schema.

public class DataObjectMapping : IMetadata

objectDataObjectMapping

IMetadata

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

The definition of the Business Key(s) for the Data Object Mapping. The order is stored as well, because in some cases the order of keys is meaningful.

[JsonPropertyName("businessKeyDefinitions")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<(int OrdinalPosition, BusinessKeyDefinition)>? BusinessKeyDefinitions { get; set; }

List<(int OrdinalPosition, BusinessKeyDefinition)>?

Free-form and optional classification for the mapping for use in data logistics generation logic (evaluation).

[JsonPropertyName("classifications")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<DataClassification>? Classifications { get; set; }

List<DataClassification>?

The collection of individual attribute (column or query) mappings.

[JsonPropertyName("dataItemMappings")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<DataItemMapping>? DataItemMappings { get; set; }

List<DataItemMapping>?

The collection of Data Items specifically associated with this Data Object Mapping, used as source/target Data Items/Queries for the mapping or the Mappings BKCM as needed.

[JsonPropertyName("dataItems")]
public List<IDataItem>? DataItems { get; set; }

List<IDataItem>?

An indicator (boolean) which can capture enabling / disabling of (the usage of) an individual source-to-target mapping.

[JsonPropertyName("enabled")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public bool? Enabled { get; set; }

bool?

The collection of extension Key/Value pairs.

[JsonPropertyName("extensions")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<Extension>? Extensions { get; set; }

List<Extension>?

Any filtering that needs to be applied to the source-to-target mapping.

[JsonPropertyName("filterCriterion")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? FilterCriterion { get; set; }

string?

An optional unique identifier for the Data Object mapping.

[JsonPropertyName("id")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? Id { get; set; }

string?

Get the standard Json representation

[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
public string Json { get; }

string

The name of the Data Object Mapping. Ideally an unique name that identifies the individual mapping.

[JsonPropertyName("name")]
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public string Name { get; set; }

string

Free-format notes on the Data Object Mapping.

[JsonPropertyName("notes")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? Notes { get; set; }

string?

The collection of associated data object for purposes other than source-target relationship. For example for lookups, merge joins, lineage etc.

[JsonPropertyName("relationships")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<(int OrdinalPosition, Relationship)>? Relationships { get; set; }

List<(int OrdinalPosition, Relationship)>?

The source object(s) of the mapping. This can either be an object or a query. Potentially multiple source objects can be mapped to a single target object.

[JsonPropertyName("sourceDataObjects")]
public List<IDataObject> SourceDataObjects { get; set; }

List<IDataObject>

The target object of the mapping. This is always a Data Object type.

[JsonPropertyName("targetDataObject")]
public IDataObject TargetDataObject { get; set; }

IDataObject

Use this method to assert if two Data Object Mappings are the same, based on their Ids.

public override bool Equals(object? obj)

obj object?

bool

True if the Data Object Mappings are the same, based on their Ids

Override to get a hash value that represents the identifier.

public override int GetHashCode()

int

A 32-bit signed integer hash code

String override so that the object returns its value (‘Name’). When an instance of this class is passed to a method that expects a string, the ToString() method will be called implicitly to convert the object to a string, and the value of the “Name” property will be returned.

public override string ToString()

string

The Name