I'm not sure what is in your input file but I'm assuming it is transaction based. i.e. things that are being built/shipped today. In order to get a complete BOM, you will have to go back to the Opera system and use its database. The app should also provide a way to produce a BOM.
I don't have any code or query examples for exploding a BOM but you should be able to find some by searching. With code, you use recursion so it doesn't matter how deep the nesting goes. However, with a query, you have to know in advance how deep the the hierarchy is. I remember being amazed at how shallow the BOM for a Boeing 747 was when I first exploded one. But, that was a long time ago and using IMS rather than a relational database so the technique was different.