It is often the case that an organization has multiple tables with the same structure, that is column names and data types, but with different names, in different databases or schemas or on different servers.
Now a single synonym can be used to describe a collection of tables with the same structure because the TABLENAME and CONNECTION parameters in the access file can be specified as a variable.
Before you create and run the data flows discussed in this section, in addition to the source data, you must also create the multiple source tables. See How to Create Sample Procedures and Data for Iteration.
This will create five identically structured tables named dmordbos, dmorddal, dmordla, dmordorl, and dmordstl.
This example has instructions for creating a synonym that can be used to read or write multiple tables. You will create two variables, TTABLE and TCON, that will be used for the table name and connection name.
Refer to the sample synonym, dmortmpl, for the complete example that also has titles and descriptions for each of the columns.
The Select adapter to configure panel opens.
The Select Synonym Candidates Step 1 of 2 panel opens.
The Create Synonym Step 2 of 2 panel opens.
This will create a synonym that you will use as a template to access any of the six tables.
The dmortmplx synonym opens.
For DEFAULT, enter the name of your connection, which by default is CON01.
The synonym is now set up for use with multiple tables.
This example has instructions for viewing the parameter table used in the other examples here. The parameter table used is a delimited flat file, but any data source that can be described by a synonym could be used. The table has three columns: a connection name, a table name, and a plant name.
The parameter table is automatically created when you run Create Sample Procedures and Data for the iterator examples. The connection name is the name of the first connection on your server for the selected database. In this example, they are all the same, but different connection names could also be used.
Tip: If you do not see synonyms when you expand the ibisamp directory, select Synonyms from the Filter group on the Home tab.
The Sample Data Report opens and should look like the following image.
This example has instructions for creating a data flow that uses a synonym as a source that can be used to read multiple identically formatted tables.
Refer to the sample flow dmorsum, for the complete example.
The Column Selection window opens.
Tip: To select all the columns, right-click one of them and click Select All.
The Transformations window opens.
The flow will look like the following image.
The Global Parameter Editor window opens.
The Global Variables calculator opens.
Click OK.
This example has instructions for creating a process flow that runs a data flow repeatedly using a source a collection of identically formatted tables.
Refer to the sample flow dmorsump for the complete example.
A new flow opens.
The properties for the flow should look like the following image.
When the flow completes, you should see a message in the console log:
DM: (ICM18763) Request ibisamp/dmorsumpx complete
When a process flow calls a data flow using the iterator, multiple logs are generated. This example shows how to view the logs.
The process flow log opens.
The iterator log opens. Note that the Parameters line show the values of each parameter for each run.
iWay Software |