HOW TO: Append a timestamp to the name of a flat file target using a PowerCENTER
Center workflow variable
Problem
Description
Can a flat file target include a timestamp along with the actual name using a PowerCenter
session and a workflow variable?
Solution
To append a timestamp to the name of a flat file target using a PowerCenter workflow variable
do the following:
1. Create a workflow variable with datatype NSTRING.
In this example, $$CaptureRunTime.
2. Create an Assignment task before the session and enter the following expression in the
Assignment Task:
$$CaptureRunTime=TO_CHAR(SYSDATE,'YYYYMMDDHH24MISS')
3. Edit the session and enter the following file name:
Output filename=FF_Example$$CaptureRunTime.out
FF_Example.txt is the target flat file name as defined in the target definition.
Refer to the attached workflow XML file for a complete example.
Applies To
Product(s): PowerCenter
Product Version(s): PowerCenter 8.x; PowerCenter 9.x
Database: Flat File
HOW TO: Parameterize the FTP connection attributes for a PowerCenter session
Solution
FTP connection can be parameterized using the following syntax:
$FTPConnection<VariableName> = <FTP_Connection_Name>
$Param_FTPConnection<VariableName>_Remote_Filename =<file_name_with_full_path>
$Param_FTPConnection<VariableName>_Is_Staged = <YES|NO>
$Param_FTPConnection<VariableName>_Is_Transfer_Mode_ASCII= <YES|NO>
Example
In a parameter file, specify the following:
[MyFolder.WF:wf_MyWorkflow.ST:s_MySession]
$FTPConnectionMyFTPConn=FTP_Conn1
$Param_FTPConnectionMyFTPConn_Remote_Filename=ftp_src.txt
$Param_FTPConnectionMyFTPConn_Is_Staged=YES
More Information
Starting from PowerCenter 8.5, FTP, queue, loader, and application connections can be
parameterized by using $FTPConnectionName, $QueueConnectionName,
$LoaderConnectionName, or $AppConnectionName session parameters respectively.
Reference
See topic "Overriding Connection Attributes in the Parameter File" in chapter "Parameter
Files" of the PowerCenter Advanced Workflow Guide.
Applies To
Product(s): PowerCenter
Product Version(s): PowerCenter 8.5.1; PowerCenter 8.6.1
FAQ: How are SrcSuccessRows, TgtSuccessRows and TgtFailedRows workflow variable
PowerCenter?
Content
SrcSuccessRows is calculated based on all the sources that are part of a particular session.
If a session has 3 sources each with 100 rows, then the SrcSuccessRows is 300.
The Applied Rows information (in Workflow Monitor> Properties > Transformation
Statistics ) is shown for each source.
Hence, the sum of all the applied rows for each source is equal to the SrcSuccessRows variable
value.
The same holds true for TgtSuccessRows .
TgtFailedRows returns the same value as the number of rejected rows in the session log.
If there is more than one target, then it is the sum of rejected rows for each target.
Reference
PowerCenter Advanced Workflow Guide > "Workflow Variables" > "Predefined Workflow
Variables"
FAQ: What is the difference between the "PrevTaskStatus" and "Status" PowerCenter wor
Problem
Description
The pre-defined workflow variables PrevTaskStatus and Status appear to return the same value.
What is the difference?
Solution
PrevTaskStatus is the status of the previous task in the workflow that the Integration Service
ran.
Status is the status of the previous task in the workflow even if the task has not run on the
Integration Service.
Example
Consider the following workflow:
Start > T1 > T2 > T3
In this example T1 succeeds and T2 is disabled.
In the Link condition between T2 and T3, T2.PrevTaskStatus returns the status of T2, when T2
is enabled and returns the status of T1 when T2 is disabled.
In this example:
T2.STATUS=DISABLED
T2.PREVTASKSTATUS=SUCCEEDED
Do we have any conditional statement in Informatica ? What are they ?
ANS: Yes, we do have. DECODE function and IIF function
Source Qualifier Transformation
Bring only the required columns from the source. Most of the times not all the columns of
the source table are required, so bring only the required fields by deleting the
unnecessary columns.
Avoid using order by clause inside the source qualifier SQL override. The order by
clause requires additional processing and performance can be increased by avoiding it.
Can we perform pipelining in Informatica ? What’s its use ?
Yes we can. If we have to perform any operation parallely