From the example that you provided, it looks like you are working with registers in your data source. When I imported your examples into Denodo using a JSON data source and selected the JSON root when creating a base view, I was able to create a selection view and then project the subfields of the register by right clicking on the field in the output tab of the view.
Regarding your question about searching within a register, I would usually recommend projecting the register before searching in it; however, I was able to search in your register using the (field).subfield format in a WHERE statement:
(productmaintype).productmaintype = ‘Currency Investment Account’
Since you are unable to project your subfields, I would make sure of the following:
1. That my fields have been correctly imported as an array or register type. To do this, you can look for the field type in the output screen of the view and make sure that it shows up as something like “<source_name>_productmaintype”; the type will also have an icon with four boxes next to it. If it does not show up like this, then I would double check that the source is formatted correctly to output a register response.
2. That I am creating a selection view before trying to project the subfields of my register. The subfields of a register cannot be projected in a base view.
For more information about compound types, you can refer to the [Management of Compound Values](https://community.denodo.com/docs/html/browse/latest/vdp/vql/advanced_characteristics/management_of_compound_values/management_of_compound_values#management-of-compound-values) section of the Virtual DataPort VQL Guide.
If you are still having trouble flattening your compound fields and you have an active support account, I recommend that you open a ticket with the support team so that they can analyze the behavior in more detail and help you to resolve it.
I hope this helps!