Profiler Object:Append Mode

From Melissa Data Wiki
Jump to navigation Jump to search

← Profiler Object Reference

Profiler Object Navigation
Introduction
System Requirements
Licensing
Order of Operations
Using Append Mode
Using Report Mode


You can open an existing profiling file for Append without any change to the order of operation code except for the SetAppendMode that needs to be set AppendModeAppend. The Profiler will ignore any column specifications or rules (example: SetColumnCustomPattern, SetColumnValueRange, SetColumnDefaultValue, SetColumnSize, SetColumnPrecision or SetColumnScale). The following pseudo-code shows the order of operation with only the necessary code to open the Profiler file in Append Mode.


1. Create an instance of the Profiler object.

Create profiler as New Instance of mdProfiler

2. Set path to the profiler data files.

CALL SetPathToProfilerDataFiles WITH DataPath

3. Call the SetFilename function to set the Profiler file you want to open on Append Mode.

CALL SetFileName WITH ExistingFile

4. Set Append Mode to Append.

CALL SetAppendMode WITH AppendModeAppend

5. Call the SetLicenseString function to set the License Key. This was supplied by your Melissa Data Representative.

CALL SetLicenseString WITH LicenseString

6. Configure the profiler object by setting these functions. These are not mandatory.

CALL SetSortAnalysis WITH SortAnalysisValue
CALL SetMatchUpAnalysis WITH MatchUpAnalysisValue
CALL SetRightFielderAnalysis WITH RightfielderAnalysisValue
CALL SetDataAggregation WITH DataAggregationValue

7. Call the InitilializeDataFiles function to connect the Profiler Object to its supporting data file.

CALL InitializeDataFiles RETURNING Result
  IF Result IS 0 THEN
    CALL GetBuildNumber Returning BuildNumber
    CALL GetDatabaseDate Returning DBExpireDate
    CALL GetLicenseExpirationDate Returning LicenseExpireDate
  ELSE
    CALL GetInitializeErrorString Returing ErrorString
    Print ErrorString
  END IF

8. Initiate profiling by calling StartProfiling function.

CALL StartProfiling

9. Loop through the input data file lines and set the column values.

WHILE ReadingInputLines
  FOREACH Column column in InputLine
    CALL SetColumn WITH column.Name, column.Value
    CALL AddRecord RETURNING ResultCodesString
    CALL GetResults WITH column.Name RETURNING ResultCodes
  END LOOP

10. CALL ProfileData function to do profiling for data aggregations.

CALL ProfileData

11. CALL the list of required functions to get the profiled values. These functions have been categorized into three different sections: table, column, and iterator get functions.

For example:

CALL GetColumnMostPopularCount WITH ColumnName RETURNING Int
CALL GetTableRecordCount RETURNING Int