โ10-01-2019 12:12 PM
Hello all,
I faced with issue with in-memory lookup. According to snaplogic documentation, [https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439008/In-Memory+Lookup] it does not supported structured JSON path like '$customer.address. It can work only with values like $customer.
Even if I put mapper before the lookup snap, it doesnโt work.
I have following json document
[{
โItemโ: {
โdateโ: โ9999-12-31T00:00:00.000Zโ,
โGeoArrayโ: [
{
โGeographyNameโ: {
โGeographyDescriptionโ: โN\Aโ,
โGeographyStateIDโ: 505074
},
โ@keyโ: โ1753-01-01 00:00:00.000000;505074;1;1;404500โ
}
]
}
}]
where geography state is id based on which description should be taken from vocabulary which is stored in separate file like key value pairs.
Basically I need to get following json as a desired result
[{
โItemโ: {
โdateโ: โ9999-12-31T00:00:00.000Zโ,
โGeoArrayโ: [
{
โGeographyNameโ: {
โGeographyDescriptionโ: โN\Aโ,
โGeographyStateIDโ: 505074,
โGeographyStateDescriptionโ: โUtahโ
},
โ@keyโ: โ1753-01-01 00:00:00.000000;505074;1;1;404500โ
}
]
}
}]
Does anybody has any idea how to implement it?
I appreciate any help
Solved! Go to Solution.
โ10-03-2019 03:00 AM
Hi,
Please check the attached pipeline, that uses a mapper to workaround the limitation of in memory snap
InMemory_2019_10_03.slp (10.3 KB)
โ10-03-2019 03:00 AM
Hi,
Please check the attached pipeline, that uses a mapper to workaround the limitation of in memory snap
InMemory_2019_10_03.slp (10.3 KB)
โ10-03-2019 03:04 AM
Thank you. It works.
I want to share with community one issue. In some cases validation shows incorrect data: in my case I did not find any lookuped value during validation, but when I save the result in file the data was looked up correctly
โ10-03-2019 09:07 AM
Preview only uses a subset of data to quickly validate your pipeline while execution uses the full set.
If preview is set to 50 and the first doc that matches the search of your pipeline is in the 51 document, you wonโt see it on validation.
You can set the number of documents used in validation. See Data Preview from a Pipeline in the documentation.