Hi,
I have a table with XML data in it which is stored in a column with STRING datatype. Can someone please help me on how to parse this XML into multiple sql columns.Below is the sample XML Table & desired output data
 
 
Select * from default.SampleData
XMLData
'Status': {
        'Code': 'Ok',
        'Message': None,
        'Errors': None
    },
    'RequestReference': None,
    'Response': {
        'IdNumber': '295',
        'SearchKeys': {
            'Subject': {
                'FirstName': 'John',
                'MiddleName': None,
                'Surname': 'Ross',
                'DateOfBirth': datetime.datetime(1900, 1, 31, 0, 0),
                'Gender': 'M'
            },
            'Address': {
                'AddressLine1': '123 old street',
                'AddressLine2': 'high street',
                'AddressLine3': '',
                'AddressLine4': None,
                'AddressLine5': None,
                'Postcode': '12345',
                'Country': None
            },
            'Phone': None,
            'DrivingLicence': None,
            'Bank': None,
            'ConsentFlag': True
        },
 
 
Expected output columns 
 
 
IDNumber   FirstName   MiddleName   LastName  DateOfBirth  AddressLine1     Phone 
295        John                      Ross      1900-01-01   123 Highstreet   None
 
 
Can someone please provide any ideas around this.