Profiler Object:Initialization: Difference between revisions
No edit summary |
No edit summary |
||
Line 134: | Line 134: | ||
|C=mdProfilerSetUserName (profiler, UserNameString); | |C=mdProfilerSetUserName (profiler, UserNameString); | ||
|.Net=profiler.SetUserName(userNameString); | |.Net=profiler.SetUserName(userNameString); | ||
}} | |||
==GetUserName== | |||
This function returns the user name for a particular run. The user name is set by the [[#SetUserName]] function. | |||
{{ Object Syntax | |||
|Syntax=profiler->GetUserName(); | |||
|C=const char* = mdProfilerGetUserName (profiler); | |||
|.Net=string = profiler.GetUserName(); | |||
}} | }} | ||
Line 152: | Line 161: | ||
|C=mdProfilerSetTableName(profiler, TableNameString); | |C=mdProfilerSetTableName(profiler, TableNameString); | ||
|.Net=profiler.SetTableName(TableNameString); | |.Net=profiler.SetTableName(TableNameString); | ||
}} | |||
==GetTableName== | |||
This function returns the table name. The table name is set by the [[#SetTableName]] function. | |||
{{ Object Syntax | |||
|Syntax=profiler->GetTableName(); | |||
|C=const char* = mdProfilerGetTableName(profiler); | |||
|.Net=string = profiler.GetTableName(); | |||
}} | }} | ||
Line 170: | Line 188: | ||
|C=mdProfilerSetJobName (profiler, JobNameString); | |C=mdProfilerSetJobName (profiler, JobNameString); | ||
|.Net=profiler.SetJobName(JobNameString); | |.Net=profiler.SetJobName(JobNameString); | ||
}} | |||
==GetJobName== | |||
This function returns the job name for a particular run. The job name is set by the [[#SetJobName]] function. | |||
{{ Object Syntax | |||
|Syntax=profiler->GetJobName(); | |||
|C=const char* = mdProfilerGetJobName (profiler); | |||
|.Net=string = profiler.GetJobName(); | |||
}} | }} | ||
Line 188: | Line 215: | ||
|C=mdProfilerSetJobDescription (profiler, JobDesciptionString); | |C=mdProfilerSetJobDescription (profiler, JobDesciptionString); | ||
|.Net=profiler.SetJobDescription(JobDesciptionString); | |.Net=profiler.SetJobDescription(JobDesciptionString); | ||
}} | |||
==GetJobDescription== | |||
This function returns the job description for a particular run. The job description is set by the [[#SetJobDescription]] function. | |||
{{ Object Syntax | |||
|Syntax=profiler->GetJobDescription(); | |||
|C=const char* = mdProfilerGetJobDescription (profiler); | |||
|.Net=string = profiler.GetJobDescription(); | |||
}} | }} | ||
Revision as of 18:13, 24 February 2015
The following functions set the paths to the necessary data files, the license, and initialize the Profiler Interface:
SetLicenseString
This function sets the license string required to enable Profiler Object’s complete functionality.
The License String is a software key that unlocks the full functionality of the component. Without the License String, the object will only function in Demo Mode.
The license string is normally set using an environment variable, MD_LICENSE. Calling SetLicenseString is an alternative method for setting the license string, but applications developed for a production environment should only use the environment variable. When using an environment variable, it is not necessary to call the SetLicenseString function. For more information on setting the environment variable, see Licensing.
This function accepts one parameter.
Parameters
Name | Data Type | Description |
---|---|---|
LicenseString | String | A string value representing the software license key. |
Return Value
The SetLicenseString function returns value of 0 or 1. A value of 0 means that the provided License String is incorrect.
Syntax | profiler->SetLicenseString(StringValue); |
---|---|
C | integer = mdProfilerSetLicenseString(profiler, LicenseString); |
.Net | integer = profiler.SetLicenseString(LicenseString); |
SetPathToProfilerDataFiles
This function sets the the path to the data files required for profiling.
The required data files are
- mdProfiler.dat
- mdProfiler.mc
This function accepts one Parameter.
Parameters
Name | Data Type | Description |
---|---|---|
LocationString | String | A string value representing the location of the Profiler data files. |
Syntax | profiler->SetPathToProfilerDataFiles(StringValue); |
---|---|
C | mdProfilerSetPathToProfilerDataFiles (profiler, LocationString); |
.Net | profiler.SetPathToProfilerDataFiles(LocationString); |
SetFileName
This function sets the path/file name of profiling output file. The processing results will be stored in the output file.
This function accepts one parameter
Parameters
Name | Data Type | Description |
---|---|---|
FileNameString | String | A string value representing the name of the file. |
Syntax | profiler->SetFileName(StringValue); |
---|---|
C | mdProfilerSetFileName(profiler, FileNameString); |
.Net | profiler.SetFileName(FileNameString); |
SetAppendMode
Optional. This function sets the mode for how the output file needs to be handled. The default is overwrite mode if this function is not called.
If a Profiler file is opened in append mode certain statistics will not be accurate, as some results cannot be carried over from run to run. Specifically: TableExactMatch, TableContactMatch, TableHouseholdMatch,TableAddressMatch, ColumnInferredDataType, ColumnSortation, and ColumnSortationPercent.
If you intend to open the file in Append mode, you will want to call SetSortAnalysis, SetMatchUpAnalysis and SetRightFielderAnalysis appropriately.
The SetAppendMode function takes a value of the enumerated type AppendMode.
Value | Name | Description |
---|---|---|
0 | Append | Add new profiling information to any existing information. |
1 | Report | Open the profile table so that reporting may be done. No new records can be appended to the profile run. |
2 | Overwrite | Overwrite existing output profile table. |
3 | MustNotExist | Output profile table must not exist. |
Parameters
Name | Data Type | Description |
---|---|---|
appendMode | AppedMode | This sets the append mode for the output file. |
Syntax | profiler->SetAppendMode(AppendModeValue); |
---|---|
C | mdProfilerSetAppendMode (profiler, appendMode); |
.Net | profiler.SetAppendMode(appendMode); |
SetUserName
Optional. This function sets the user name for a particular run.
This function accepts one parameter.
Parameters
Name | Data Type | Description |
---|---|---|
UserNameString | String | A string value representing the user name. |
Syntax | profiler->SetUserName(userNameString); |
---|---|
C | mdProfilerSetUserName (profiler, UserNameString); |
.Net | profiler.SetUserName(userNameString); |
GetUserName
This function returns the user name for a particular run. The user name is set by the #SetUserName function.
Syntax | profiler->GetUserName(); |
---|---|
C | const char* = mdProfilerGetUserName (profiler); |
.Net | string = profiler.GetUserName(); |
SetTableName
This function sets the name of the table.
This function accepts one parameter
Parameters
Name | Data Type | Description |
---|---|---|
TableNameString | String | A string value representing the table name. |
Syntax | profiler->SetTableName(tableNameString); |
---|---|
C | mdProfilerSetTableName(profiler, TableNameString); |
.Net | profiler.SetTableName(TableNameString); |
GetTableName
This function returns the table name. The table name is set by the #SetTableName function.
Syntax | profiler->GetTableName(); |
---|---|
C | const char* = mdProfilerGetTableName(profiler); |
.Net | string = profiler.GetTableName(); |
SetJobName
Optional. This function sets the job name for a particular run.
This fuction accepts one parameter
Parameters
Name | Data Type | Description |
---|---|---|
JobNameString | String | A string value representing the Job name. |
Syntax | profiler->SetJobName(jobNameString); |
---|---|
C | mdProfilerSetJobName (profiler, JobNameString); |
.Net | profiler.SetJobName(JobNameString); |
GetJobName
This function returns the job name for a particular run. The job name is set by the #SetJobName function.
Syntax | profiler->GetJobName(); |
---|---|
C | const char* = mdProfilerGetJobName (profiler); |
.Net | string = profiler.GetJobName(); |
SetJobDescription
Optional. This function sets the job description for a particular run.
This function accepts one parameter.
Parameters
Name | Data Type | Description |
---|---|---|
JobDesciptionString | String | A string value representing the job description. |
Syntax | profiler->SetJobDescription(jobDescriptionString); |
---|---|
C | mdProfilerSetJobDescription (profiler, JobDesciptionString); |
.Net | profiler.SetJobDescription(JobDesciptionString); |
GetJobDescription
This function returns the job description for a particular run. The job description is set by the #SetJobDescription function.
Syntax | profiler->GetJobDescription(); |
---|---|
C | const char* = mdProfilerGetJobDescription (profiler); |
.Net | string = profiler.GetJobDescription(); |
SetSortAnalysis
Optional. This function enables/disables the sortation analysis, which can increase AddRecord profiling time. This time penalty grows geometrically as more records are added. If you are not interested in this statistic, disable it to decrease your profiling time.
The default value is "true." A "false" value will disable this function. This property should be set before InitializeDataFiles is called.
Parameters
Name | Data Type | Description |
---|---|---|
SortAnalysisValue | Int | 0-False, 1-True. This Sets the analysis on or off. |
Syntax | profiler->SetSortAnalysis(int); |
---|---|
C | mdProfilerSetSortAnalysis(profiler, SortAnalysisValue); |
.Net | profiler.SetJobSortAnalysis(SortAnalysisValue); |
SetMatchUpAnalysis
Optional. This function enables/disables duplicate record detection. Duplicate analysis increases the AddRecord profiling time by under 5% and ProfileData profiling time by about 30%. These time increases often outweigh the usefulness of having these statistics.
The default value is "true." A "false" value will disable this function. This property should be set before InitializeDataFiles is called.
Parameters
Name | Data Type | Description |
---|---|---|
MatchUpAnalysisValue | Int | 0-False, 1-True. This Sets the analysis on or off. |
Syntax | profiler->SetMatchUpAnalysis(int); |
---|---|
C | mdProfilerSetMatchUpAnalysis(profiler, MatchUpAnalysisValue); |
.Net | profiler.SetMatchUpAnalysis(MatchUpAnalysisValue); |
SetRightFielderAnalysis
Optional. This function enables/disables inferred data type analysis. This analysis is responsible for the Inconsistent Data and Inferred Data Type statistics. This increases the AddRecord profiling time by under 10%. It is usually good to keep these useful analysis, even with the increased profiling time.
The default value is "true." A "false" value will disable this function. This property should be set before InitializeDataFiles is called.
Parameters
Name | Data Type | Description |
---|---|---|
RightFielderAnalysisValue | Int | 0-False, 1-True. This Sets the analysis on or Off |
Syntax | profiler->SetRightFielderAnalysis(int); |
---|---|
C | mdProfilerSetRightFielderAnalysis(profiler, RightFielderAnalysisValue); |
.Net | profiler.SetRightFielderAnalysis(RightFielderAnalysisValue); |
SetDataAggregation
Optional. This function enables/disables all forms of aggregation and value gathering. Any statistic that cannot be determined incrementally (for example, median, population standard deviation, etc.) is determined via aggregation. This analysis is also responsible for all value tables (Frequency, Pattern, SoundEx, etc.). All iterators and data aggregation statistics are dependent on this analysis. This increase profiling time by over 90%. These statistics are usually useful enough to justify the increased profiling time.
The default value is "true." A "false" value will disable this function and by dependency disable all iterators and data aggregation statistics. This property should be set before InitializeDataFiles is called.
Parameters
Name | Data Type | Description |
---|---|---|
DataAggregationVale | Int | 0-False, 1-True. This Sets the aggregation on or off. |
Syntax | profiler->SetDataAggregation(int); |
---|---|
C | mdProfilerSetDataAggregation(profiler, dataAggregationValue); |
.Net | profiler.SetDataAggregation(dataAggregationValue); |
InitializeDataFiles
This function opens the required data files and prepares the profiler for use. You must call the SetLicenseString function if you don’t have the MD_LICENSE environmental variable set prior to calling InitializeDataFiles.
If the InitializeDataFiles function returns a code other than zero, you can call the GetInitializeErrorString function to display a string describing the error.
Required Functions
You must successfully call SetPathToProfilerDataFiles and SetFileName functions.
The InitializeDataFiles function returns a value of the enumerated type ProgramStatus.
Value | Name | Description |
---|---|---|
0 | ErrorNone | No error - initialization was successful. |
1 | ErrorConfigFile | Error in Configuration file |
2 | ErrorDatabaseExpired | Database file expired |
3 | ErrorLicenseExpired | License expired. |
4 | ErrorProfileFile | Error in Profile file |
5 | ErrorUnknown | Unknown error. |
Syntax | profiler->InitializeDataFiles(); |
---|---|
C | ProgramStatus = mdProfilerInitializeDataFiles(profiler); |
.Net | ProgramStatus = profiler.InitializeDataFiles(); |
GetInitializeErrorString
This function returns a descriptive string to describe an error from the InitializeDataFiles function. This can be used to output a message to the user.
Syntax | profiler->GetInitializeErrorString(); |
---|---|
C | string = mdProfilerGetInitializeErrorString(profiler); |
.Net | string = profiler.GetInitializeErrorString(); |