Profiler Object:Order of Operations

From Melissa Data Wiki
Revision as of 21:16, 19 December 2016 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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



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 ouput file.

CALL SetFileName WITH OutputFile

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

CALL SetLicenseString WITH LicenseString

5. 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

6. These setting are optional.

CALL SetUserName WITH UserNameString
CALL SetTableName WITH TableNameString
CALL SetJobName WITH JobNameString
CALL SetJobDescription WITH JobDescriptionString

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. Add the columns to the table mentioned above.

CALL AddColumn WITH ColumnNameString, ColumnType, DataType

9. Configure the Column by setting the following functions. These are not mandatory.

CALL SetCustomPattern WITH ColumnName, RegularExpression RETURNING Int
CALL SetValueRange WITH ColumnName, FromString, ToString RETURNING Int
CALL SetDefaultValue WITH ColumnName, ValueString RETURNING Int
CALL SetColumnSize WITH ColumnName, SizeValue 
CALL SetColumnPrecision WITH ColumnName, PrecisionValue
CALL SetColumnScale WITH ColumnName, ScaleValue

10. Initiate profiling by calling StartProfiling function.

CALL StartProfiling

11. 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

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

CALL ProfileData

13. 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 funtions.

For example:

CALL GetColumnMostPopularCount WITH ColumnName RETURNING Int
CALL GetTableRecordCount RETURNING Int