Configuring the tMap component - Cloud - 8.0

Business rules

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > Processing components (Integration) > Business rules components
Data Quality and Preparation > Third-party systems > Processing components (Integration) > Business rules components
Design and Development > Third-party systems > Processing components (Integration) > Business rules components
Last publication date
2024-02-20

Procedure

  1. Double-click tMap to open its Map Editor.
  2. In the lower right part of the map editor, click the plus button to add eight columns: age, annualRevenue, loanDeposit, loanAmount, numberOfYears, loanInterest, monthlyPayment, rejected.
    These columns will appear in the synonyms table on the right side of the map editor. In this example, the table is row1.
  3. In the upper left part of the map editor (input flow), select the age and annualRevenue columns and drop them respectively to the age and annualRevenue columns in the upper right part of the map editor (output flow).
    Alternatively, click Auto map! to map the columns with the same name automatically.
  4. In the row1 table, click the Expression column in the loanDeposit row to locate the cursor, and then click the [...] button to open the Expression Builder dialog box.
    Enter the following expression to calculate the loan deposit:
    Math.round(((loanAsk.downPayment  / loanAsk.totalAmount)*100)) 
    Click OK to close the Expression Builder dialog box.
    Now the downPayment and totalAmount fields from the incoming data flow are concatenated to the output column: loanDeposit.
  5. Click the Expression column in the loanAmount row to locate the cursor.
    Enter the following expression to calculate the amount of loan:
    loanAsk.totalAmount - loanAsk.downPayment
  6. Click the Expression column in the numberOfYears row to locate the cursor.
    Enter loanAsk.duration to concatenate the duration row of the input flow to the numberOfYears row in the output column.
  7. Enter 0.0 in the Expression column of the loanInterest and monthlyPayment rows respectively.
  8. Enter false in the Expression column of the rejected row.
  9. Click OK to close the map editor.