Hey folks, having trouble importing some Excel files - I would like to rename some of the fields on import using the mapping property, but having troubles with field names that have a space in it...
for example, the following works:
CALL apoc.load.xls('/LiveOptics_1101503_VMware_07_23_2020.xlsx', 'ESX-Hosts', {ignore: ['Datacenter','vCenter','Cluster','OS','Local Capacity (GB)','Free Capacity (GB)','Used Capacity (GB)','Guest VM Count', 'ConfigStatus','Boot Time'], mapping: {Model: {name:'wahoo'}}})
But the following yields an error:
CALL apoc.load.xls('/LiveOptics_1101503_VMware_07_23_2020.xlsx', 'ESX-Hosts', {ignore: ['Datacenter','vCenter','Cluster','OS','Local Capacity (GB)','Free Capacity (GB)','Used Capacity (GB)','Guest VM Count', 'ConfigStatus','Boot Time'], mapping: {'Serial No': {name:'wahoo'}}})
The error is below:
Neo.ClientError.Statement.SyntaxError
Invalid input ''': expected whitespace, an identifier, UnsignedDecimalInteger, a property key name or '}' (line 1, column 248 (offset: 247))
"CALL apoc.load.xls('/LiveOptics_1101503_VMware_07_23_2020.xlsx', 'ESX-Hosts', {ignore: ['Datacenter','vCenter','Cluster','OS','Local Capacity (GB)','Free Capacity (GB)','Used Capacity (GB)','Guest VM Count', 'ConfigStatus','Boot Time'], mapping: {'Serial No': {name:'wahoo'}}})"
^