🏅TransformResult

TransformationResult

This class represents the result of a data transformation process, encapsulating various properties and methods needed to handle transformed data, quality validation results, transformation report, and other related information.

Methods

AsJson

Returns the result table as JSON.

Example:

string jsonResult = transformationResult.AsJson();

AsCompressedBytes

Returns the result table as a compressed byte object.

Example:

byte[] compressedResult = transformationResult.AsCompressedBytes();

GetCSVNameOfExportFile

Gets the filename from the map, calls MappingSpecification.GetCSVName.

Example:

string csvFileName = transformationResult.GetCSVNameOfExportFile();

GetXLSXNameOfExportFile

Gets the filename from the map, calls MappingSpecification.GetXLSXName.

Example:

string xlsxFileName = transformationResult.GetXLSXNameOfExportFile();

GetJSONNameOfExportFile

Gets the filename from the map, calls MappingSpecification.GetJSONName.

Example:

string jsonFileName = transformationResult.GetJSONNameOfExportFile();

LookupsToTable

Converts the lookup maps back into a DataTable.

Example:

DataTable lookupsTable = transformationResult.LookupsToTable();

GetMissingMapsTable

Generates a table for the missing maps information.

Example:

DataTable missingMapsTable = transformationResult.GetMissingMapsTable();

Yardi_SegmentValidation

Runs segment validation, adding the results to DataQualityResults.

Parameters:

  • path (string): Path to import.

Example:

transformationResult = transformationResult.Yardi_SegmentValidation("path/to/file");

Yardi_SegmentValidation

Runs segment validation, adding the results to DataQualityResults.

Parameters:

  • Segments (List<SegmentValidation.SegmentRaw>): List of raw segments.

Example:

List<SegmentValidation.SegmentRaw> segments = new List<SegmentValidation.SegmentRaw>();
transformationResult = transformationResult.Yardi_SegmentValidation(segments);

Yardi_SegmentValidation

Runs segment validation, adding the results to DataQualityResults.

Parameters:

  • Segments (byte[]): Byte array of compressed segments.

You can serialize and de-serialize segments with:

  • SegmentValidation.SegmentRaw.DeserializeArray(bytes)

  • SegmentValidation.SegmentRaw.SerializeArray(segments)

Example:

byte[] segments = new byte[0];
transformationResult = transformationResult.Yardi_SegmentValidation(segments);

WriteCSV

Writes the CSV file for the transformed file and appends the results to the transformation report.

Example:

byte[] csv = transformationResult.WriteCSV();

WriteXLSX

Writes the XLSX file for the transformed file.

Parameters:

  • topColor (XLColor, optional): XL top band color if any header rows are added.

  • headerRows (int, optional): Number of header rows.

  • headerImageFile (byte[], optional): If provided, an image will be added at the top within the header rows.

Example:

byte[] xlsx = transformationResult.WriteXLSX();

WriteJSON

Writes the JSON file for the transformed file.

Parameters:

  • formatting (Newtonsoft.Json.Formatting, optional): JSON formatting.

Example:

byte[] json = transformationResult.WriteJSON();

GenerateTransformationReport

Generates the tables needed for a transformation report.

Example:

List<DataTable> transformationReportTables = transformationResult.GenerateTransformationReport();

GenerateDataQualityReport

Generates the tables needed for a data quality report.

Example:

List<DataTable> dataQualityReportTables = transformationResult.GenerateDataQualityReport();

ToZippedResults

Produces a zip of the results of the transformation.

Parameters:

  • includeMap (bool, optional): Includes mapping file.

  • includeTransformed (bool, optional): Includes transformed file.

  • includeTransformReport (bool, optional): Includes transform report.

  • includeDQReport (bool, optional): Includes DataQualityReport.

  • includeMissingMaps (bool, optional): Includes missing maps, if any.

  • IncludeLookupMaps (bool, optional): Includes used lookupValueMaps.

  • rptLogoPath (string, optional): If supplied, used as the branded logo header for reports.

  • rptHeaderRows (int, optional): Number of header rows to append.

  • rptTopColor (XLColor, optional): Header row solid color fill.

  • inputFileBytes (byte[], optional): Original file will also be included in the zip if supplied.

  • inputFileName (string, optional): Original file name if supplied.

  • format (CleanFileFormat, optional): Sets the file format of the transformed file.

Example:

byte[] zippedResults = transformationResult.ToZippedResults();

ToZippedResults_Branding

Produces a zip of the results of the transformation with branding information from a byte array.

Parameters:

  • includeMap (bool, optional): Includes mapping file.

  • includeTransformed (bool, optional): Includes transformed file.

  • includeTransformReport (bool, optional): Includes transform report.

  • includeDQReport (bool, optional): Includes DataQualityReport.

  • includeMissingMaps (bool, optional): Includes missing maps, if any.

  • IncludeLookupMaps (bool, optional): Includes used lookupValueMaps.

  • rptLogo (byte[], optional): If supplied, used as the branded logo header for reports.

  • rptHeaderRows (int, optional): Number of header rows to append.

  • rptTopColor (XLColor, optional): Header row solid color fill.

  • inputFileBytes (byte[], optional): Original file will also be included in the zip if supplied.

  • inputFileName (string, optional): Original file name if supplied.

  • format (CleanFileFormat, optional): Sets the file format of the transformed file.

Example:

byte[] zippedResultsWithBranding = transformationResult.ToZippedResults_Branding();

Properties

DataTableName

The data table name (Transformation Group).

DataObjectID

A data object ID assigned from the map used.

DataQualityResults

A list of data quality results.

Report

The transformation report.

TargetTable

The resulting target table.

LookupMaps

Lookup maps used in process.

map

The mapping specification used during the process.

FileName

The filename, if supplied, of the source file.

TransformationTime

The time the transformation took.

HasMissingMaps

Indicates if there are missing maps.

Last updated