Table of Contents

Search

  1. Preface
  2. Introduction to Informatica Big Data Management
  3. Mappings in the Hadoop Environment
  4. Mapping Sources in the Hadoop Environment
  5. Mapping Targets in the Hadoop Environment
  6. Mapping Transformations in the Hadoop Environment
  7. Processing Hierarchical Data on the Spark Engine
  8. Configuring Transformations to Process Hierarchical Data
  9. Processing Unstructured and Semi-structured Data with an Intelligent Structure Model
  10. Stateful Computing on the Spark Engine
  11. Monitoring Mappings in the Hadoop Environment
  12. Mappings in the Native Environment
  13. Profiles
  14. Native Environment Optimization
  15. Cluster Workflows
  16. Connections
  17. Data Type Reference
  18. Function Reference
  19. Parameter Reference

Convert Relational or Hierarchical Data to Nested Struct Data

Convert Relational or Hierarchical Data to Nested Struct Data

You can convert relational or hierarchical data in one or more columns in two transformations to nested struct data. Use the
Create Nested Complex Port
wizard in the Developer tool to perform the conversion.
The wizard converts relational data from two tables to struct data with a nested data type definition.
For example, a relational table contains employee bank account details. Another table contains the bank details. You create a mapping to convert data in the two tables into a hierarchical format that the payment system can process. Select the ports in the two transformations and use the Create Nested Complex Port wizard. The wizard generates struct data that contains an array element for each bank. The array contains a struct element for the employee bank account details.
Relational input
The Emp_Details table contains the following columns: employee ID, name, address, bank id, and bank account number.
The Bank_Details table contains the following columns: bank id, bank name, SWIFT code.
Struct output
banks{ bank_swift:integer [bank_name{account_number:integer,employee_id:integer,name:string,address:string] }
The wizard performs the following tasks:
  • Adds a Joiner transformation to join source data from the parent and child tables based on the join keys.
    The transformation that contains ports for the parent complex data type definition is the parent transformation, and the other transformation is the child transformation.
  • Creates a child complex data type definition and adds an Expression transformation that contains the child struct port.
    The expression in the struct port generates a struct based on the child complex data type definition.
  • Adds an Aggregator transformation that contains an array port.
    The expression in the array port generates an array with the child struct as its element, and groups the struct values based on the group by port.
  • Creates a parent complex data type definition and adds an Expression transformation that contains the nested complex port.
    The expression in the nested complex port generates a struct with an array of structs as one of its elements.


Updated October 23, 2019