Amazon S3 V2 Connector > Mappings and mapping tasks with Amazon S3 V2 > Amazon S3 V2 target file parameterization
  

Amazon S3 V2 target file parameterization

You can parameterize the file name and target folder location for Amazon S3 V2 target objects to pass the file name and folder location at run time. If the folder does not exist, the Secure Agent creates the folder structure dynamically. Amazon S3 V2 target file parameterization applies only to mappings.

Parameterization using timestamp

You can append time stamp information to the file name to show when the file is created. You can use parameterization using timestamp when you create a mapping to write a file of flat format type.
When you specify a file name for the target file, include special characters based on Apache STRFTIME function formats that the mapping task uses to include time stamp information in the file name. You must enable Handle Special Characters options to handle any special characters in the %[mod] format included in the file name. You can use the STRFTIME function formats in a mapping.
If you enable Handle Special Characters, the Secure Agent ignores the input and output parameters in Create Target.
The following table describes some common STRFTIME function formats that you might use in a mapping or mapping task:
Special Character
Description
%d
Day as a two-decimal number, with a range of 01-31.
%m
Month as a two-decimal number, with a range of 01-12.
%y
Year as a two-decimal number without the century, with range of 00-99.
%Y
Year including the century, for example 2015.
%T
Time in 24-hour notation, equivalent to %H:%:M:%S.
%H
Hour in 24-hour clock notation, with a range of 00-24.
%l
Hour in 12-hour clock notation, with a range of 01-12.
%M
Minute as a decimal, with a range of 00-59.
%S
Second as a decimal, with a range of 00-60.
%p
Either AM or PM.

Parameterization using a parameter file

You can parameterize an Amazon S3 V2 target file using a parameter file. You can use a parameter file when you create a mapping to write a file of flat format type.
Perform the following steps to parameterize an Amazon S3 V2 target file using a parameter file:
  1. 1. Create an Amazon S3 V2 target object.
  2. 2. Specify the values of the Target File Name as $p1 and Target Object Path as $p2 in the Create Target option.
  3. 3. Define the parameters that you added for the target object name and target object path in the parameter file.
  4. For example,
    $p1=filename
    $p2=path
  5. 4. Place the parameter file in the following location:
  6. <Informatica Cloud Secure Agent\apps\Data_Integration_Server\data\userparameters>
  7. 5. Specify the parameter file name in Schedule tab of the mapping task.
  8. 6. Save and run the mapping task.