Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I'm having problems converting an extract that is being presented in Key/Value pairs. The following is an example:
A
groupNbr|04512345
language|jp
RangeNumber|2550xxxxx
LifecycleStatus|60
manufacturerPartNumber|Dxx
manufacturerPartNumberFormatted|Dxx
baseUnitOfMeasure|EA
salesUnitOfMeasure|BG
packSize|20
packType|FINISHED
additionalSearchTerms|
imagePrimary|F045xxxx.jpg
rangeID|PCSR_11xxx
subRangeID|PCSSR_35xxxx
subRangeName|xDL
familyID|PSF_43xxxx
familyName|xxxxxxxx
sectionName|xxxxxxxxxxxxxx
searchAttributeNameValue|xxxxxxxxxxxxxxxxxxxx
EOR
My issue is that not all pairs are always present. They always have a groupNBR and a language but the next record may not, for example, have a record for 'imagePrimary' or 'sectionName' so it needs to be able to cope with varying record format.
I have found MaheshMP's tFileInputKeyValue custom component and though it works very well in foreground mode, it returns corrupted data when run as an exported job. Some files complete, others fail completely or have partial data. It does not error and I have not been able to identify the cause.
Does anyone have any recommendations for how I could use standard components to solve this please, or any other suggestions?
Many thanks
Ian