Technical

Tips

How to Divide a Column

You can download a sample script for this tip by clicking on the following link.
Please download the sample script and try it out.

How to use the sample script:
1. Download the sample script file to local disk from above link.
2. Start DataMagic Manager and log in.
3. From the menu of DataMagic Management screen, select Import Management Information and import the sample script.
4. Download the sample data files and place them to the indicated path as below.

Introduction

Let's divide a single column containing first and last names into two separate columns, one for first names and one for last names.
To divide the names, we'll use the spaces between the first names and the last names as a key.

Processing diagram

Functions used
   - REPLACE_REG Function

Diagram of completed data processing information

Sample data files

  • *Click to download the sample data files and place them to the indicated place.
How to Create Sample Data Processing Information
1. Create new data processing information with the name Tips7.
2. Specify the input and output settings and map them.
3. Map the input and output fields.

Add a number of output fields equal to the number of fields that you want to divide, and map each field to an input field that you want to divide.

4. Specify the field for the last names to be divided into.
5. Use the REPLACE_REG function to specify processing to only output the first names.
6. Specify the field for the first names to be divided into.
7. Use the REPLACE_REG function to specify processing to only output the last names.
8. Apply the data processing information, and execute the processing.

If the data is output with the first and last names divided, as in the processing diagram, the processing was successful.

In Conclusion

So, what do you think?
DataMagic has many functions to process the contents of output data based on the contents of input data.
In addition to dividing one column of data into multiple columns, DataMagic's functions can be used for many other purposes. Please use them to meet your company's needs.