Kourier Integrator Online Help
It is common for many applications to segment transactional files (or tables) by year or some other important piece of information. For example, the current year's General Ledger file might be named GL while the prior year's General Ledger files are named GL-2008 and GL-2007 (this list of files will be used throughout the remainder of this document to illustrate concepts or results). Another common method for this approach in a MultiValue database is to use "comma files" instead of separate stand-alone files. If using comma files, the archive files might be called GL,GL2008 and GL,GL2007.
The term files refers to both "Files" when working in the MultiValue environment, and "Tables" when using ODBC connections to data sources such as Microsoft SQL Server, MySQL, Access, etc.
The Related Data Files feature in Kourier Integrator allows you to combine information from related data files into one Microsoft SQL Server table for ease of reporting using just one export specification, saving you time setting up and maintaining you data exports. This guide outlines the steps required to accomplish this goal.
001: YEAR = FIELD(FILENAME$,'-',2)
002: IF YEAR = '' THEN YEAR = OCONV(DATE(),'DY')
003: FIELD$ = YEAR
Line 001 extracts the year from the file that is currently being processed. In Line 002, if the year could not be found (as is the case if the current year's file named GL), then the year will be determined by the current system date. Line 003 returns the year using the standard FIELD$ variable.
{%source_id}_{%sequence(MR%7)}_{%sql_table}.{%export_mode}
When an export specification that has been defined with related files is executed from the service, the Kourier export engine will automatically process each related file specified in the export by replacing the Select Data File and Export Data File and then executing the export specification.
Using the example above with the related files list consisting of GL, GL-2008 and GL-2007, the resulting datasets produced by the full refresh service via the export specification will be named as shown below:
2009_0001234_GL.full
2008_0001235_GL.full
2007_0001235_GL.fullThe resulting datasets are then loaded into SQL using either SSIS or DTS packages. Refer to the Generate SSIS Package help for more information.