Skip to content

DataObjectQuery

Namespace: DataWarehouseAutomation.DwaModel
Assembly: DataWarehouseAutomation.dll

A data query is a bespoke code element that is scoped for a specific function or purpose, and can act as a ‘source’ in a source-target mapping. This applies to both data object and data item level. When acting the data object object, the data query replaces the source data object in the mapping. This is a data object query, which could be a view, script, or procedure that provides the data in the mapping instead of a table or file.

public class DataObjectQuery : IDataObject

objectDataObjectQuery

IDataObject

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 Query. Being able to record the business key definition This serves multiple purposes, but one of them is to support defining a series of business key definitions against the source data object, and reuse these across different data object mappings.

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

List<BusinessKeyDefinition>?

Free-form and optional classification for the Data Query for use in generation logic (evaluation).

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

List<DataClassification>?

The connection for the query.

[JsonPropertyName("dataConnection")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public DataConnection? DataConnection { get; set; }

DataConnection?

The collection of Data Items associated with this Data Object Query.

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

List<IDataItem>?

The collection of extension Key/Value pairs.

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

List<Extension>?

Identifier for the Data Query.

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

string?

The name for the query.

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

string

Free-format notes.

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

string?

The actual code that constitutes the query.

[JsonPropertyName("queryCode")]
public string? QueryCode { get; set; }

string?

The language that the code was written in (e.g. SQL).

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

string?

Any relationship to other data objects and/or queries.

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

List<(int OrdinalPosition, Relationship)>?

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

public override bool Equals(object? obj)

obj object?

bool

true if Data Object Queries 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