Forum Discussion

pavia's avatar
pavia
New Contributor II
2 years ago
Solved

Create Expression Library from Excel data

I have a couple situations where there are lists of values that will need to be referenced and those lists will change in different runs of the pipelines. 

Since they will change, updating mappers or conditionals doesn't seem ideal, so am thinking that creating and using expression libraries would work well but I'm struggling to convert the data into one and use it.

For example, I have the following Excel table that is being read in and parsed 

I want to be able to look up the CovCode in a different pipeline and return the Plan or Tier for the associated code.

  • I was able to get the result I was looking for by doing a Group by N with a group size of 0 and then a JSON formatter with Format Each Document and Pretty-Print checked. Then used a File Writer to create the expression library with the covcode data. Then I created another expression library with an expression to do a lookup from the original data fields to the covcode list that I could reference easily in a mapper.  There were multiple places in my raw data that contained these covcodes, so this approach seems to reduce some additional snaps for me.