DataMagic Technical Column Vol.16

<File Merging>

Introduction

In the previous technical column (Vol. 16), we explained aggregation processes such as summarizing sales by sales department, summarizing company-wide labor costs, and summarizing labor costs by department. When performing aggregation processes like these, multiple files must be merged in advance.

Merging multiple files may seem simple at first glance, but coding each file individually, such as by sorting them before merging, can often require complex programming, resulting in development efforts that take longer than expected.

With DataMagic, you can not only sort and merge multiple files, but also easily delete and merge duplicate records across multiple files.

This TIPS will introduce an example of merging and integrating multiple customer master data managed by each department. Note that in order to use this TIPS, DataMagic must be installed on your computer. For information on where to obtain DataMagic and how to install it, please refer to the separate article "Installing DataMagic."

How to operate

Step 1 - Prepare the source data

First, prepare the CSV data to be converted. Once the data is ready, save it in the following folder on the PC where DataMagic is installed.
C:\work\SAMPLE16\ (saved with file names "in1", "in2", and "in3")

»Download the source data (Note: The sample file is in zip format. Please unzip it before use.)

Step 2 - Download and configure DataMagic script file

Download the script file below and save it in the folder where DataMagic is installed.
C:\work\SAMPLE16\ (saved as "sample16.igen")

Launch DataMagic management screen and import the downloaded script file into DataMagic. To import, click the [Import Management Information] icon under [Tools] on the start screen. Specify the downloaded file on the Import Management Information screen and click the Import button. The ID SAMPLE16 will then be registered on the Data Processing Information List screen.

»Download the script file (Note: The sample file is in zip format. Please unzip it before use.)

Step 3 - Run DataMagic

Double-click the data processing information ID SAMPLE16 registered in step 2 and check that the file names for the input and output settings are set correctly. Open the data processing information ID SAMPLE16 from the screen and click the "Execute" button at the top of the screen.

Step 4 - Check the execution results

When execution is complete in step 3, a file called "out" will be created in C:\work\SAMPLE16\, which is specified in the output settings. Check this file using an editor such as Notepad.

lastly

In this example, we deleted duplicate records from data split into three files and merged them, but you can merge up to 20 files and specify multiple keys when merging. By combining this with the functions introduced so far, you can easily achieve even more advanced conversions.
Please download DataMagic trial version and try out the technical column explanations.

  • The trial version is free to use for 60 days.
  • After you sign up for the trial version, you will receive 90 days of free technical support.

DataMagic Column List

Related Content

Return to column list