33254-samplefile.xml
I thought I'd have a looked at the new XML import in ADF but I'm stuck trying to flatten the data.
I have attached an xml sample file I'm using.
The import looks to have worked OK as I can see the data
But when I try and flatten it is all greyed out and I can't select a root anything, what have I missed?
Here's the JSON if it helps
{
"name": "dataflow2",
"properties": {
"type": "MappingDataFlow",
"typeProperties": {
"sources": [
{
"linkedService": {
"referenceName": "AzureBlobStorage1",
"type": "LinkedServiceReference"
},
"name": "source1"
}
],
"sinks": [],
"transformations": [
{
"name": "Flatten1"
}
],
"script": "source(output(\n\t\tCUSTOMERS as (CUSTOMER as ({@CREATED_DATE} as string, {@GROUP_ID} as string, {@ID} as integer, ADDRESS as (ADDRESS_LINE_1 as string, ADDRESS_LINE_2 as string, ADDRESS_LINE_3 as string, COUNTRY as string, COUNTY as string, POSTCODE as string, TOWNCITY as string), ATTRIBUTE as ({@DeezNutz } as string, {value} as boolean), CONTACT_DETAILS as (EMAIL as ({@Mar Com DG _OPT_IN} as boolean, {value} as string), TELEPHONE as ({@Mar Com DG _OPT_IN} as boolean, {@type } as string, {value} as integer)), DATE_OF_BIRTH as string, GENDER as string, NAME as (FIRST_NAME as string, LAST_NAME as string, TITLE as string), NOTE as string))\n\t),\n\tallowSchemaDrift: true,\n\tvalidateSchema: false,\n\tignoreNoFilesFound: false,\n\tformat: 'xml',\n\tcontainer: 'test-xml',\n\tfileName: 'SampleFile.xml',\n\tvalidationMode: 'none',\n\tnamespaces: true,\n\tpartitionBy('hash', 1)) ~> source1\nsource1 foldDown(mapColumn(\n\t\tCUSTOMERS\n\t),\n\tskipDuplicateMapInputs: false,\n\tskipDuplicateMapOutputs: false) ~> Flatten1"
}
}
}
Thanks,
Jay