Skip to main content

TRANSLITERATE Function

Transliterates Asian script characters from one script form to another. The string can be specified as a column reference or a string literal.

Wrangle vs. SQL: This function is part of Wrangle, a proprietary data transformation language. Wrangle is not SQL. For more information, see Wrangle Language.

Basic Usage

Column reference example:

transliterate(MyJapaneseSentences,HiraganaToKatakana)

Output: Returns the values in the myJapaneseSentences transliterated from Hiragana script form to Katakana script form.

Syntax and Arguments

transliterate(column_string,form_enum)

Argument

Required?

Data Type

Description

column_string

Y

string

Name of the column or string literal to be applied to the function

form_enum

Y

string (enumerated value)

The transliteration form as an enumerated value. Details below.

For more information on syntax standards, see Language Documentation Syntax Notes.

column_string

Name of the column or string constant to be transliterated. String values must be in a supported Japanese script form. See below.

  • Missing string or column values generate missing string results.

  • String constants must be quoted ('Hello, World').

  • Multiple columns and wildcards are not supported.

Usage Notes:

Required?

Data Type

Example Value

Yes

String literal or column reference

myColumn

form_enum

Enumerated value to indicate the transliteration to apply to the referenced column:

Nota

Each width option can be paired with each form option. Four separate options are supported.

Enum value

Description

HiraganaToKatakana

Transliterates Hiragana to Katagana

KatakanaToHiragana

Transliterates Katagana to Hiragana

FullwidthToHalfwidth

Transliterates full-width forms to half-width form

HalfwidthToFullwidth

Transliterates half-width forms to full-width form

Usage Notes:

Required?

Data Type

Example Value

Yes

String (enumerated type)

HiraganaToKatakana

Examples

Suggerimento

For additional examples, see Common Tasks.

Example - TRANSLITERATE Function

Source:

English

Japanese_Hiragana

a

i

u

e

o

ka

ki

ku

ke

ko

Transformation:

The following transliterates the above characters into Katakana form:

Transformation Name

New formula

Parameter: Formula type

Single row formula

Parameter: Formula

transliterate(Japanese_Hiragana, HiraganaToKatakana)

Parameter: New column name

'Japanese_Katakana'

The generated Katakana form is full-width. The following transliterates that column into half-width form:

Transformation Name

New formula

Parameter: Formula type

Single row formula

Parameter: Formula

transliterate(Japanese_Katakana, FullwidthToHalfwidth)

Parameter: New column name

'Japanese_Katakana_halfwidth'

Results:

English

Japanese_Hiragana

Japanese_Katakana

Japanese_Katakana_halfwidth

a

i

u

e

o

ka

ki

ku

ke

ko