Table of Contents

Search

  1. Preface
  2. Introduction to Informatica Big Data Management
  3. Connections
  4. Mappings in the Hadoop Environment
  5. Mapping Objects in the Hadoop Environment
  6. Processing Hierarchical Data on the Spark Engine
  7. Stateful Computing on the Spark Engine
  8. Monitoring Mappings in the Hadoop Environment
  9. Mappings in the Native Environment
  10. Profiles
  11. Native Environment Optimization
  12. Data Type Reference
  13. Complex File Data Object Properties
  14. Function Reference
  15. 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 December 13, 2018