Replace by CSV Table

Logic Name

Replace by CSV Table

Function

Replaces the input string based on a CSV file and returns the value of the string.

Data Types

Location Type
The first input handler String
Logic output String
lightbulbRefer to "Logic Specifications" for details.

Properties

Category Property Description
Required CSV file name Specify the CSV file used to replace.
Required File encoding Specify the encoding of the file.
Required Key column number Specify the key column number.
Required Value column number Specify the value column number.
Required Skip header of first line Specify whether to skip the header of the first line.
Required Matching method Specify the matching method.
Required Replacing method Specify the replacing method.
Additional string Prefix Specify a string to add before the replacement string.
Additional string Suffix Specify a string to add after the replacement string.
Comment Comment The comment will also be output to the specifications.It does not affect the conversion process.

Matching method

Option Description
Exact match Replaces when the value of the input handler matches the value of [Key column number] exactly.
Partial match Replaces when a part of the input handler matches the value of [Key column number].
lightbulbReturns the value of the first input handler as is if there is no value which matches.

Replacing method

Option Description
Complete replacement Replaces the value of the first input handler with the value of [Value column number].
Partial replacement Replaces the matching part of the first input handler with the value of [Value column number].

Function Details

Specifying Multiple Keys

Multiple key columns can be specified with the following methods.
  1. Enter multiple column numbers separating with commas in [Key column number].
  2. Press [Finish] button.
  3. The input handlers of the Mapper logic will be changed to the specified key column number.

Specification Limits

Notes

Logic Sample

Mapping Definition

Logic Settings and Processing Result (Exact match)

The logic converts the first column of the input data with a CSV File.
Property Settings
Property Setting
CSV file name /data/conversionFile.csv
File encoding Shift_JIS
Key column number 1
Value column number 2
Skip header of first line Not Checked
Matching method Exact match
Replacing method Complete replacement
Prefix  
Suffix .
Input Data
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
CSV File
Sunday,Sun
Monday,Mon
Tuesday,Tue
Wednesday,Wed
Thursday,Thu
Friday,Fri
Saturday,Sat
Result Data
Sun.
Mon.
Tue.
Wed.
Thu.
Fri.
Sat.

Logic Settings and Processing Result (Partial match)

The logic converts the first column of the input data with a CSV File.
Property Settings
Property Setting
CSV file name /data/conversionFile.csv
File encoding Shift_JIS
Key column number 1
Value column number 2
Skip header of first line Not Checked
Matching method Partial match
Replacing method Partial replacement
Prefix  
Suffix  
Input Data
3/20 (Sunday)
3/21 (Monday)
3/22 (Tuesday)
3/23 (Wednesday)
3/24 (Thursday)
3/24 (Friday)
3/25 (Saturday)
CSV File
Sunday,Sun
Monday,Mon
Tuesday,Tue
Wednesday,Wed
Thursday,Thu
Friday,Fri
Saturday,Sat
Result Data
3/20 (Sun)
3/21 (Mon)
3/22 (Tue)
3/23 (Wed)
3/24 (Thu)
3/24 (Fri)
3/25 (Sat)

Logic Settings and Processing Result (Specifying column number)

Replace values to the values which match the multiple keys of CSV file.
Property Settings
Property Setting
CSV file name /data/conversionFile.csv
File encoding Shift_JIS
Key column number 2,3
Value column number 1
Skip header of first line Not Checked
Matching method Partial match
Replacing method Partial replacement
Prefix  
Suffix  
Input Data
1B
2A
3B
CSV File
1A,1,A
1B,1,B
2A,2,A
2B,2,B
3A,3,A
3B,3,B
Result Data
1B
2A
3B