DataObjectMapping
Class DataObjectMapping
Section titled “ Class 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
This definition is used twice in the DataObjectMapping: as the *SourceDataObjects* and as the *TargetDataObject*
- both instances/lists of
The other key component of a DataObjectMapping is the
public class DataObjectMapping : IMetadata
Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Properties
Section titled “Properties”BusinessKeyDefinitions
Section titled “ BusinessKeyDefinitions”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; }
Property Value
Section titled “Property Value”List<(int OrdinalPosition, BusinessKeyDefinition)>?
Classifications
Section titled “ Classifications”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; }
Property Value
Section titled “Property Value”DataItemMappings
Section titled “ DataItemMappings”The collection of individual attribute (column or query) mappings.
[JsonPropertyName("dataItemMappings")][JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]public List<DataItemMapping>? DataItemMappings { get; set; }
Property Value
Section titled “Property Value”DataItems
Section titled “ DataItems”The collection of Data Items
[JsonPropertyName("dataItems")]public List<IDataItem>? DataItems { get; set; }
Property Value
Section titled “Property Value”Enabled
Section titled “ Enabled”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; }
Property Value
Section titled “Property Value”bool?
Extensions
Section titled “ Extensions”The collection of extension Key/Value pairs.
[JsonPropertyName("extensions")][JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]public List<Extension>? Extensions { get; set; }
Property Value
Section titled “Property Value”FilterCriterion
Section titled “ FilterCriterion”Any filtering that needs to be applied to the source-to-target mapping.
[JsonPropertyName("filterCriterion")][JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]public string? FilterCriterion { get; set; }
Property Value
Section titled “Property Value”An optional unique identifier for the Data Object mapping.
[JsonPropertyName("id")][JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]public string? Id { get; set; }
Property Value
Section titled “Property Value”Get the standard Json representation
[JsonIgnore(Condition = JsonIgnoreCondition.Always)]public string Json { get; }
Property Value
Section titled “Property Value”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; }
Property Value
Section titled “Property Value”Free-format notes on the Data Object Mapping.
[JsonPropertyName("notes")][JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]public string? Notes { get; set; }
Property Value
Section titled “Property Value”Relationships
Section titled “ Relationships”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; }
Property Value
Section titled “Property Value”List<(int OrdinalPosition, Relationship)>?
SourceDataObjects
Section titled “ SourceDataObjects”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; }
Property Value
Section titled “Property Value”TargetDataObject
Section titled “ TargetDataObject”The target object of the mapping. This is always a Data Object type.
[JsonPropertyName("targetDataObject")]public IDataObject TargetDataObject { get; set; }
Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”Use this method to assert if two Data Object Mappings are the same, based on their Ids.
public override bool Equals(object? obj)
Parameters
Section titled “Parameters”obj
object?
Returns
Section titled “Returns”True if the Data Object Mappings are the same, based on their Ids
GetHashCode()
Section titled “ GetHashCode()”Override to get a hash value that represents the identifier.
public override int GetHashCode()
Returns
Section titled “Returns”A 32-bit signed integer hash code
ToString()
Section titled “ ToString()”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()
Returns
Section titled “Returns”The Name