Alternatif solusi :
addMonth(-3) ke current_date simpan ke field last_3_month
kemudian filter dengan kriteria
tanngal> last_3_month and
tanggal<=current_date
Contoh Flow nya
DataFeeder_1 :
Data Feeder : DataFeeder_1 Feeds constant data :
1|2|20220302
2|2|20200404
P|Z|20210702
3|y|20210901
Transformator_1 :
Transformator Transformator_1 transforms the output of 'DataFeeder_1' using the following transfromation function(s)
Input Field |
Operation |
Output Field |
Type |
line |
RegexSplitter(Splitter=|) |
f1
f2
tanggal |
String
String
String |
|
CurrentTimestamp |
current_date |
Timestamp |
Transformator_2 :
Transformator
Transformator_2 transforms the output of '
Transformator_1' using the following transfromation function(s)
Input Field |
Operation |
Output Field |
Type |
f1 |
No Operation |
f1 |
String |
f2 |
No Operation |
f2 |
String |
tanggal |
StringToTimestamp(yyyyMMdd) |
tanggal |
Timestamp |
current_date |
AddMonth(-3) |
last_3_mont |
Timestamp |
current_date |
No Operation |
current_date |
Timestamp |
Filter_1 :
Filter
Filter_1 filters the output of '
Transformator_2' using the following criteria
tanggal > [last_3_mont] AND
tanggal <= [current_date]
Transformator_3 :
Transformator
Transformator_3 transforms the output of '
Filter_1' using the following transfromation function(s)
Input Field |
Operation |
Output Field |
Type |
f1 |
No Operation |
f1 |
String |
f2 |
No Operation |
f2 |
String |
tanggal |
TimestampToString(yyyyMMdd) |
tanggal |
Timestamp |
Std Output
StdOtutput_1 writes the output of
'Transformator_3' to the standard output .