EDS Optional Date Formats in Output File Name
EDS extracts now support optional format codes for 5 current keywords for the parameter extractnamepatternex:
@DATETIMESTAMP{…}
@DATESTAMP{…}
@EFFECTIVEDATE{…}
@FROMEFFECTIVEDATE{…}
@TOEFFECTIVEDATE{…}
As before,
@DATETIMESTAMP indicates the source of the date is the current timestamp
@DATESTAMP indicates the source of the date is the current datestamp
@EFFECTIVEDATE indicates the source of the date is the effectiveDate parameter
@FROMEFFECTIVEDATE indicates the source of the date is the fromEffectiveDate parameter
@TOEFFECTIVEDATE indicates the source of the date is the toEffectiveDate parameter
If no format is specified in curly braces immediately after the keyword,
then the macro will function as before with a fixed format.
Inside the optional curly braces {} is a format string.
Inside the curly braces, the characters (Y,y,m,d) will be interpreted as datetime format codes:
Y 4 digit year
y 2 digit year
m 2 digit month
d 2 digit day
All 5 keywords with optional format codes are available for EDS extracts using Distribution Profiles.
The 3 keywords relying on user specified date parameters (@EFFECTIVEDATE, @FROMEFFECTIVEDATE, @TOEFFECTIVEDATE)
are available with the default distribution.
Example of parameter to specify distribution profile name:
<taskParameter>
<name>distributionprofilename</name>
<value>test_dist_prof</value>
</taskParameter>
Corresponding distribution profile definition would be file test_dist_prof_profile.json in folder estar/tpe/dynamic/metadata/distributions/
Example of file distribution inside a distribution profile:
{
"data_sinks": [
{
"sink": "file_dest",
"type": "ssFileType",
"file_folder": "/apps/eagle/estar/tpe/data/msgcenter/cmw_staging_folder/",
"mode": "w",
"compression_codec": "none",
"distributiondeliveryattempts": 5,
"distributionretryintervalseconds": 3
}
]
}
Also, the json definition of a distribution profile can be passed in its entirety in the distributionprofilejsondefinition parameter.
Details of distribution profiles: Distribution Profiles
Examples of optional format codes
<taskParameter>
<name>extractnamepatternex</name>
<value>HOLDINGS_@DATESTAMP{Y-d-m}.dat</value>
</taskParameter>
HOLDINGS_2021-05-03.dat
<taskParameter>
<name>effectiveDate</name>
<value>2018-02-22</value>
</taskParameter>
<taskParameter>
<name>extractnamepatternex</name>
<value>HOLDINGS_@EFFECTIVEDATE{m-d-Y}.dat</value>
</taskParameter>
HOLDINGS_02-22-2018.dat
<taskParameter>
<name>effectiveDate</name>
<value>2018-02-22</value>
</taskParameter>
<taskParameter>
<name>extractnamepatternex</name>
<value>HOLDINGS_@EFFECTIVEDATE{ymd}.dat</value>
</taskParameter>
HOLDINGS_180222.dat
<taskParameter>
<name>effectiveDate</name>
<value>2018-02-22</value>
</taskParameter>
<taskParameter>
<name>extractnamepatternex</name>
<value>HOLDINGS_@EFFECTIVEDATE{mY}.dat</value>
</taskParameter>
HOLDINGS_022018.dat