Purplecube provides set of inbuilt parameters which are pre-defined with Purplecube related details or specifications. These can be used in any expression definitions across Data Flow and Job Flow. These will be replaced by the pre-defined value during execution.

Below is the list of Purplecube defined System Parameters.

NameReturn TypeDescription
AgentVersionvarcharThis resolves to the version of the Purplecube Agent associated with the job execution.
AppLogDirvarchar

This resolves to the fully qualified path of logs directory in the Purplecube Agent installation associated with the job execution.

Example: /app/beta_agnt/Purplecube/agent/app/logs

AppRootDirvarchar

This resolves to the fully qualified path of app directory in the Purplecube Agent installation associated with the job execution.

Example: /app/beta_agnt/Purplecube/agent/app

AuditId

number

This resolves to the Purplecube generated unique identifier assigned to the job flow or data flow execution.

BadFileDirvarchar

This resolves to the fully qualified path of bad directory in the Purplecube Agent installation associated with the job execution.

Example: /app/beta_agnt/Purplecube/agent/app/bad

ControllerVersionvarcharThis resolves to the version of the Controller where job flow or data flow is being executed.
CtrlFileDirvarchar

This resolves to the fully qualified path of control directory in the Purplecube Agent installation associated with the job execution.

Example: /app/beta_agnt/Purplecube/agent/app/control

CurrentDatedate

This resolves to the current date from Controller. It works differently on jobs that have agent associated with them and the once that have data point associated with them. Parameter picks controller/agent date details when job is associated with agent and parameter picks database date details and converts as per the data point associated to job. It can be used in source,transforms,target and jobs.

For reference, below is for DB Command which converts date as per datapoint associated to DB Command.

Replaced Params for Unit: DBCOMMAND_NAME_1 are

[$$CURRENTDATE : to_date('20190503','YYYYMMDDHH24MISS')]

Below is for command task which runs on agent associated with it and picks agent date

Replaced Params for Unit: TASK_NAME_1 are

[$$CURRENTDATE : 20190503]

CurrentDateStringvarchar

This resolves to the current date string from the Controller. It works differently on jobs that have agent associated with them and the once that have data point associated with them.Parameter picks controller/agent date details when job is associated with agent and parameter picks database date details when data point is associated to job. It can be used in source,transforms,target and jobs.

For reference, below is for DB Command which picks as per datapoint associated to DB Command.

[$$CURRENTDATESTRING : 20190503191618]

Below is for command task which runs on agent associated with it and picks agent date

[$$CURRENTDATESTRING : 20190503191618]

CurrentTimeStamptimestamp

This resolves to the current time stamp from the Controller. It works differently on jobs that have agent associated with them and the once that have data point associated with them.Parameter picks controller/agent timestamp details when job is associated with agent and parameter picks database timestamp details and converts as per the data point associated to job.It can be used in source,transforms,target and jobs.

For reference, below is for DB Command which converts timestamp as per datapoint associated to DB Command.

Replaced Params for Unit: DBCOMMAND_NAME_1 are

[$$CURRENTTIMESTAMP : to_timestamp('20190503191618.645','YYYYMMDDHH24MISS.FF3')]

Below is for command task which runs on agent associated with it and picks agent date

Replaced Params for Unit: TASK_NAME_1 are

[$$CURRENTTIMESTAMP : 20190503191618.637]

DataFileDirvarchar

This resolves to the fully qualified path of data directory in the Purplecube Agent installation associated with the job execution.

Example: /app/beta_agnt/Purplecube/agent/app/data

DataFlowNamevarcharThis resolves to the name of the Data Flow being executed. This parameter can be used only inside data flow.
JobFlowInstanceNamevarcharThis resolves to the name of the instance assigned to execution of Job Flow.
JobFlowNamevarcharThis resolves to the name of the Job Flow being executed.
JobNamevarcharThis resolves to the name of the Job being executed.
JobStartTimetimeThis resolves to the date and time when Job started executing.
JobIdnumberThis resolves to the unique number for each job.
LayerNamevarcharThis resolves to the name of the layer where the job flow or data flow being executed resides.
LoginUserIdvarcharThis resolves to the login Id of the user with which the job flow or data flow is being executed.
LoginUserPasswordvarcharThis resolves to the password of the logged in user with which the job flow or data flow is being executed.
ParamFileDirvarchar

This resolves to the fully qualified path of param directory in the Purplecube Agent installation associated with the job execution.

Example: /app/beta_agnt/Purplecube/agent/app/param

ProjectIdnumberThis resolves to the Purplecube generated unique identifier for the Project.
ProjectNamevarcharThis resolves to the name of the Project where the job flow or data flow being executed resides.
RepositoryNamevarcharThis resolves to the name of the Repository where the job flow or data flow being executed resides.
RunByvarcharThis resolves to the login id of the user with which the job flow or data flow is being executed.
RunIdnumberThis resolves to the Purplecube generated unique identifier assigned for the job flow and data flow execution.
ServerLogDirvarchar

This resolves to the fully qualified path of logs directory in the Purplecube Controller installation.

Example: /app/beta_agnt/Purplecube/controller/logs

ServerRootDirvarchar

This resolves to the fully qualified path of controller installation directory.

Example: /app/beta_agnt/Purplecube/controller

SrcFileDirvarchar

This resolves to the fully qualified path of source directory in the Purplecube Agent installation associated with the job execution.

Example: /app/beta_agnt/Purplecube/agent/app/param

SrcFileNamevarchar

This resolves to the name of the source file processed by the data flow during execution. This is applicable only when source is file. This parameter should be used as <source instance transform name>.$$SrcFileName. This parameter can be used only inside data flow.

Example: Src_Stores.$$SrcFileName

SrcDoNamevarcharThis resolves to the data object name associated with the source instance transform. This parameter can be used only in source instance transform.
SrcIdvarcharThis resolves to the Purplecube generated unique identifier assigned to the source instance transform. This parameter can be used only in source instance transform.
SrcNamevarcharThis resolves to the source instance transform name. This parameter can be used only in source instance transform.
TgtFileDirvarchar

This resolves to the fully qualified path of target directory in the Purplecube Agent installation associated with the job execution.

Example: /app/beta_agnt/Purplecube/agent/app/target

TgtDoNamevarcharThis resolves to the data object name associated with the target instance transform. This parameter can be used only in target instance transform.
TgtNamevarcharThis resolves to the target instance transform name. This parameter can be used only in target instance transform.

Usage - System Parameters are used for defining expressions in Expression Editor.

The Expression Editor displays the list of System parameters for reference, and the parameter name is prefixed with '$$'. To see the list of System Parameters, select Parameters from the drop down, and then click System Parameters.


Use Case I: Using system parameter as part of the target file name in Data flow instance. 

Step I: On Canvas, click on the job, and then under Properties, click Connections. Click 'L', that is the Load properties of target object 'TGT_SRC_DEPARTMENT'.


Step II: The Load Properties window opens.

Specify the system parameter as part of the "value" field for the property "File Name". Here, there is no expression editor so, the system parameter needs to be typed in. Prefix it with $$. During run-time, the value for property "File Name" will be replaced with the value defined for the parameter - "TGT_Department_$$Current_date.dat". Here, $$CurrentDate variable will get replaced with corresponding Purplecube defined value during run-time.


Use Case II: Using System parameter in the Task Command.

Step I: On Canvas, click on the task command job, and then under Properties, click on the Command Tab.  Open the editor for the command by clicking on the arrow.


The Expression Editor window opens.

Step II: Provide the command to be executed. For illustration, here we are checking if the file specified exists and deleting it using system parameter.

The expression editors will have section to display all the applicable parameters. To list all the System parameters, click on the System Parameters.

Click on the System Parameter name to use it in the expression. During run-time, parameter will be replaced with the value defined for it - "TGT_SRC_DEPARTMENT_$$CurrentDate.dat". Here, $$CurrentDate variable will get replaced with corresponding Purplecube defined value during runtime.