Feb-19-2019, 01:41 AM
Hello Everyone,
Newbie to this forum - so, please excuse me if this question has been answered earlier - please redirect me to the right place, if that is the case.
I am trying to parse an excel into a hashmap table - with nested hashes inside. What is the optimal way to do this ?
The structure looks like the following - can be an indeterminate number of rows, and there is no particular pattern to whether a product or attribute is selected or not :
Schema looks like this :
Unique ID | Line Item | Parent Product | Product | Attribute | Value
A given Unique ID can have multiple line items, and each line item can have multiple parent products and so on.
The catch is : for any given line item, a product / attribute entity be present in multiple rows - in one row as a product, in one or more rows as a parent product for some other sub-product or attribute - and this nesting can be anywhere between 1 to 5 levels deep.
I hope I am explaining the question correctly. Is there a way to write a generic dictionary parsing logic to read the data from a file with a few thousand entries or more into a dictionary ?
Thanks in advance for the help and responses.
Arjun
Newbie to this forum - so, please excuse me if this question has been answered earlier - please redirect me to the right place, if that is the case.
I am trying to parse an excel into a hashmap table - with nested hashes inside. What is the optimal way to do this ?
The structure looks like the following - can be an indeterminate number of rows, and there is no particular pattern to whether a product or attribute is selected or not :
Schema looks like this :
Unique ID | Line Item | Parent Product | Product | Attribute | Value
A given Unique ID can have multiple line items, and each line item can have multiple parent products and so on.
The catch is : for any given line item, a product / attribute entity be present in multiple rows - in one row as a product, in one or more rows as a parent product for some other sub-product or attribute - and this nesting can be anywhere between 1 to 5 levels deep.
I hope I am explaining the question correctly. Is there a way to write a generic dictionary parsing logic to read the data from a file with a few thousand entries or more into a dictionary ?
Thanks in advance for the help and responses.
Arjun