While creating data mappings you may run into the need to store some variables in a table in a Key \ Value Pair. This way you can call the variable by its Key to get the Value and pass it to the other system. This is helpful when the 2 systems store data in different ways. An example of this would be a table that stores United States abbreviations as the key and the full state name as the value. This is helpful when the source stores the full state name and the target stores the abbreviation or visa versa. So how do we set this up?
1) In the navigation bar click on "MORE".
2) Click on "Lookup Tables".
3) Click on the "+" sign on the right hand side.
4) In the pop-up input a Name.
5) On the ellipses button on the right under Description you will get a dropdown with "Create", "Append" and "Export".
5.1) Create - Click this to create a new Key / Value Pair in the table.
5.2) Append - If you have a CSV file already created this is how you import it. I do want to point out that is needs to be a CSV that is separated by "," and nothing else or import will fail.
5.3) Export - Exports the table
Now that we have out table built, we need to consume it. To do this we will use the functions found in the Lookup Functions. Here are the specific ones:
1) In the navigation bar click on "MORE".
2) Click on "Lookup Tables".
3) Click on the "+" sign on the right hand side.
4) In the pop-up input a Name.
5) On the ellipses button on the right under Description you will get a dropdown with "Create", "Append" and "Export".
5.1) Create - Click this to create a new Key / Value Pair in the table.
5.2) Append - If you have a CSV file already created this is how you import it. I do want to point out that is needs to be a CSV that is separated by "," and nothing else or import will fail.
5.3) Export - Exports the table
Now that we have out table built, we need to consume it. To do this we will use the functions found in the Lookup Functions. Here are the specific ones:
- LOOKUPTABLEVALUE1() - Looks in column 2 for the value we pass it and returns the value in column 1 in the same row.
- LOOKUPTABLEVALUE1_DEFAULT() -Looks in column 2 for the value we pass it and returns the value in column 1 in the same row. If nothing is found in the table it returns the default value we pass it.
- LOOKUPTABLEVALUE2() - Looks in column 1 for the value we pass it and returns the value in column 2 in the same row.
- LOOKUPTABLEVALUE2_DEFAULT() - If nothing is found in the table it returns the default value we pass it. If nothing is found in the table it returns the default value we pass it.
Comments
Post a Comment