Talend Data Mapper - steffenbischoff.com

43
Talend Data Mapper Jaromir Kotala IT4BI GmbH [email protected]

Transcript of Talend Data Mapper - steffenbischoff.com

Talend Data MapperJaromir Kotala

IT4BI GmbH

[email protected]

What is Talend Data Mapper?

• Talend Data Mapper allows you to map complex data structures and documents and execute transformations

• Various complex formats: XML, JSON, EDI, HL7, Cobol, AVRO, …

• Integrated in Talend Studio (separate Perspective)

• Development, Testing, Maintenance

• XQuery

• Included in all Talend Platforms

Talend Data Mapper Advantages

• Different Formats, same way of work

• Complex mapping simplified

• Reusable

• Documentation

• Easy Testing

Talend Studio 8 - Installation

• Talend Data Mapper not enabled per default

• Enable in Features (Feature Manager)

Mapping in context

• tMap

Mapping in context

• tMap

• tXmlMap

Mapping in context

• tMap

• tXmlMap

• tHMap

Talend Studio – Data Mapper

• Metadata / Perspektive

Structures

• Input / Output Structures

• Manually created or imported

• Single Root Node

• Metadata

Structures

• Create From sample file or manually

Structures

• Highlighting

Maps

• Input and Output Structure

• Transformations

Maps

• Create Map

Maps

• Create Map

Maps

• Create Map, select Input & Output Structure

Maps

• Create Map, select Input & Output Structure

Maps

• Create Map, select Input & Output Structure, Map elements

Drag & Drop, automaticmapping matching names

Expressions

• Expressions use functions, arguments and references to map elements in order to define the actions to be performed in the map.

• Functions: units of code that accept arguments and return a single value

• Arguments: parameters used to define a function, e.g. filter.

• Map elements: references to elements in the input or output structure of the map.

Expressions

• Expressions usage:

Loop

• Looping over elements, which appear multiply times

• Filter

• Sorting

Tree form:

Text form:

Value

• Defines the value of the element. It can be an expression or a simple reference to a map element.

Emit

• Defines the conditions where this element is emitted (forced to appear) when the element is optional or part of a choice

Validate

• Runtime Data Validation Filter Output

Util

• expression associated with the output map element

• executed before the map element is executed

Functions

• General

• Comparison and Logical

• Date and Time

• Aggregate

• Arithmetic

• Data Masking

• String

• Loop

• Special …

Java functions

• Possibility to use any Java Functions

Custom routines / JARs

• Any code and functionality using routines

Custom routines / JARs

• Any code and functionality using routines

• Custom JARs need to be in Mapper Class Path

Context variables

• Context Variables

• Read in Data Mapper – Function GetMapProperty

• context.Name

Using in DI Jobs

• Use flat structure – generated from schema

• Use complex structures – Data Mapper metadata

Using in DI Jobs

• Component Configuration

Using in DI Jobs

• Component Configuration

Using in Routes

• Use cMap Component in Route

• Use tHMap Component in Service

Testing

• Testing in Studio – whole document

Testing

• Testing in Studio – whole document

Testing

• Testing in Studio – selected elements

Testing

• Testing in Studio – selected elements

Test cases

• Create test case from Test output

Test cases

• Run Test case

Test cases

• Run Test case

Demo

Questions

Thank you

Jaromir Kotala

IT4BI GmbH

[email protected]

Danke für Eure Aufmerksamkeit!