Table of Contents

Search

  1. Preface
  2. Introduction to Informatica Data Engineering Integration
  3. Mappings
  4. Mapping Optimization
  5. Sources
  6. Targets
  7. Transformations
  8. Python Transformation
  9. Data Preview
  10. Cluster Workflows
  11. Profiles
  12. Monitoring
  13. Hierarchical Data Processing
  14. Hierarchical Data Processing Configuration
  15. Hierarchical Data Processing with Schema Changes
  16. Intelligent Structure Models
  17. Blockchain
  18. Stateful Computing
  19. Appendix A: Connections Reference
  20. Appendix B: Data Type Reference
  21. Appendix C: Function Reference

Complex Functions

Complex Functions

A complex function is a type of pre-defined function in which the value of the input or the return type is of a complex data type. The transformation language includes complex functions for complex data types. Use complex functions to generate, process, and parse hierarchical data.
The following table describes the complex functions for array data type:
Complex Function
Description
ARRAY (
element1
[,
element2
] ... )
Generates an array with the specified elements. The data type of the argument determines the data type of the array.
COLLECT_LIST (
value
)
Returns an array with elements in the specified port. The data type of the argument determines the data type of the array. COLLECT_LIST is an aggregate function.
CONCAT_ARRAY (' ',
array_of_strings
)
Concatenates string elements in an array based on a separator that you specify and returns a string.
SIZE (
array
)
Returns the size of the array.
The following table describes the complex functions for map data type:
Complex Function
Description
MAP (
key1, value1
[,
key2, value2
] ... )
Generates a map with elements based on the specified key-value pair. The data type of arguments determines the data type of the map elements.
MAP_FROM_ARRAYS (
key_array
,
value_array
)
Generates a map from the specified key and value arrays. The data type of arguments determines the data type of the map elements.
MAP_KEYS (
map
)
Returns an array of keys for the specified map.
MAP_VALUES (
map
)
Returns an array of values for the specified map.
COLLECT_MAP (
value
)
Returns a map with elements based on the specified arguments. The data type of the argument determines the data type of the map. COLLECT_MAP is an aggregate function.
SIZE (
map
)
Returns the size of the map.
The following table describes the complex functions for struct data type:
Complex Function
Description
STRUCT_AS (
type_definition
,
struct
)
Generates a struct with a schema based on the specified complex data type definition and the values you pass as argument.
STRUCT (
element_name1
,
value1
)
Generates a struct with the specified names and values for the elements. The data type of the value is based on the specified value argument.
RESPEC (
type_definition
,
struct
)
Renames each element of the given struct value based on the names of the elements in the specified complex data type definition.
CAST (
type_definition
,
struct
)
Changes the data type and the name of each element for the given struct value based on the corresponding data type and name of the element in the specified complex data type definition.
The following table describes the complex functions that parse hierarchical data midstream in a mapping:
Complex Function
Description
PARSE_JSON (
upstream_string
,
:Type.type_definition_library.type_definition
)
Parses hierarchical JSON data in a string data type and generates a struct with a schema based on the specified complex data type definition.
PARSE_XML (
upstream_string
,
:Type.type_definition_library.type_definition
)
Parses hierarchical XML data in a string data type and generates a struct with a schema based on the specified complex data type definition.
For more information about the function syntax, return value, and examples, see the
Informatica Developer Transformation Language Reference
.

0 COMMENTS

We’d like to hear from you!