Babelway Help Center home page

| Help center

Sign in
  1. Babelway
  2. Babelway User Guide
  3. Chapter 4. Channels

4.7.9. Automatic Population of Lookup table using Channel

Automatic Population of Lookup table allows you to import the lookup table data from outside data source.

After creation of a lookup table you can create a data import channel by clicking on Create a channel to import data in the table as illustrated below:

mceclip0.png

Create a lookup table data import Channel

 

This will automatically create a data import channel in your account with predefined gateways and message definitions.

You can upload your CSV file directly from the created web gateway like the following example or you can modify the channel to meet your requirements.

mceclip1.png

Lookup Tables Data Import Channel

 

In this example we have two fields (counterName and value).

Below, please find the CSV file:

1,1001
2,1002
3,1003
4,1004

 

How to create a "Message Out" of type XML to use it in the lookup table.

1- Go to the "Message Out" and create Message Out of type XML using the below XML sample:

mceclip2.png

Create the Message Out for the lookup table channel


Note: Below is the XML sample file:

<?xml version="1.0" encoding="UTF-8"?>
<csv xmlns="http://xmlns.babelway.com/2007/message-format/csv">
	<line>
		<field>a</field>
		<field>b</field>
		<field>c</field>
		<field>d</field>
		<field>e</field>
		<field>f</field>
		<field>g</field>
		<field>h</field>
		<field>i</field>
		<field>j</field>
	</line>
</csv>
		

2- Select the Loop node and remove it by clicking on "Remove this loop".

mceclip3.png

Remove the Loop under the line node


3- Select "line" node and click on "Create loop" to create a loop node above the "Line" node. This will allow to create multiple lines in the output message.

mceclip4.png

Create a Loop above the line node


4- Select the "field" node and duplicate it nine times by clicking on "Duplicate".

mceclip5.png

Duplicate the field node


5- Select the "field" node and change its "Label" to "code" in this example. The code is the name of the first column of the lookup table.

mceclip6.png

Rename the field node


Note: It is not mandatory to change all the "field" node's labels but this will make it easy when mapping the "Message In" to the "Message Out" in the transformation.

Babelway Terms of use