0

I need to convert the XML_TEST to XML readable schema so that it can be flattened based on Array Data Type and achieve the desired output provided below.

Input Data: DataFrame:

ID|NAME|XML_TEXT

1|XXXX|Nested XML

2|YYYY|nested XML

Schema:

ID String

Name String

XML_TEST String

output:

ID|NAME|XML_ID1|COL2|COL3

1|XXXX|10|ABC|DEF

2|YYYY|11|GGGG|DDD

If it was a direct XML we can achieve this using root and row tags but here(XML_TEXT) is of String Data Type and also need to be flattened.

0 Answers0