This depends on the schema which you have used for the output.
Please attach the schema to verify it .
This is not possible in CDI (Cloud Data Integration). yes CDI can create JSON but it can only create flat json no arrays/structs. If your requirement is to an array you would need to use Cloud Data Integration Elastic (CDI-e).
This process handles the complex data types via Spark.
Thanks for your reply .
I was able to create the required output as per "Arrays in hierarchy builder " but now I am having issues with the size of the file .I have 500K records in the source and would generate a 250 mb data file .
Hierarchy builder has a precision value not exceeding "1048576" which would generate a 100 mb file.Can I split the file into multiple smaller files in the target in a single run...may be using transaction control .I tried transaction control before Hierarchy builder transformation but it is not splitting the file .