ETL -KETTLE Tutorial examples. 4 ---- actual conversion tool (value map, the column switch, the constant increase, increase in the sequence, etc.) Examples of the ETL tools -KETTLE tutorial actual conversion. 3 ----

 

Then last lecture, finished commonly used input and output controls, the terms of this section, we used conversion under control, as shown below:

 

 

 

3, conversion

3.1 value map: a content data stream, converted into another data stream and outputs. It acts like sql statement decode function.

 

 

 

   Used herein are three controls, input table, the output table (refer to the foregoing content) and value map. Three control lines are connected with hop.

   Double-value map, configured as shown above the respective source and destination values, the connection from A to table B via line table. Results are as follows:

 

 

 3.2 switch: the two-dimensional data in which a data stream is converted to line (i.e. to convert the column header row), showing for the key fields.

   Used herein are two controls, the input table (refer to the foregoing content) and a column switch. Two control lines are connected with hop.

   Double-column switch, configured as shown above key section, constituting a packet and target fields. Run Results FIG Step 4 above.

 

 

 

 3.3 Cut string: substr functions as various databases, of little use can be ignored.

 

 

  3.4 removing duplicate records: Deduplicate performed according to a field similar to the sql statement distinct

 

 

 

  Used herein are two controls, input tables (refer to foregoing summary) and removal of duplicate records. Two control lines are connected with hop.

   TABLE input according to the comparison needs to be sorted field, configured as shown above for the counter field and the field compare FIG. Run Results FIG Step 3 above

 

 

  3.5 constant increase, increase sequence: increase constant and increasing database sequence

 

 

 

 As shown above, sequences and constant values ​​configured value, to generate

 

Continuous update. . . . . . . . .

 

Past articles:

 

Welcome to public concern number, reply "Tutorial" get the source code, the source code for an example, to scan the next Fanger Wei code plus interest

 

Guess you like

Origin www.cnblogs.com/dalaba/p/12103987.html