Databases Reference
In-Depth Information
8. The output file requires a dispatch date, but this data is not contained in
the input file. In the real world, we might have a number of choices at this
point. For example, we could change the input file to include a dispatch date
so that it can be mapped to the output file. In our case, we will generate a
relevant date using the Studio date functionality. Click on the ellipsis in the
Expression column of the dispatch date, which will bring up the Expression
Builder. In the Categories section in the bottom left-hand corner, scroll
through and click on TalendDate . This will show a number of date functions
in the middle Functions window. Find the function getCurrentDate and
double-click on it. The function syntax will appear in the expression code
window. Click on OK in the Expression Builder window to save the changes.
9. As noted previously, our input file contains the data for orders that are yet
to be dispatched, so we want to remove this data from the output. The tMap
component contains an expression filter that allows us to do just that. In the
top right-hand corner of the out1 schema is a white arrow icon with a
green + sign (highlighted in red in the following screenshot):
10. Click on this to reveal the expression filter editor. We want to filter our data
to where the shipping status on the input file is shipped, rather than when it
is picked, sourced, or anything else. To implement this, drag the shipping_
status field from the input schema across to the expression filter box. It will
show as row1.shipping_status . Edit this so that it shows as the following:
("shipped").equals(row1.shipping_status)
 
Search WWH ::




Custom Search