Glossary loader

It loads given rows to the spy_glossary_key table and the spy_glossary_translation table. After loading it also triggers the publish events for glossary.

Configuration

XPath

Type

Description

glossary/@keyField

Attribute

name of the field containing the key

glossary/@translationField

Attribute

name of the field containing the value for translation table

glossary/@localeIdField

Attribute

name of the field containing the fk_locale for translation table

glossary/@localizedKeyValuesField

Attribute (optional)

name of the field containing the localized key values

glossary/@disablePublishEvents

Attribute (optional)

if set to true, the publish event Glossary.key.publish will not be triggered. ⚠️ This should only be used when handling the publish events elsewhere or manually.

Example 1

Input data

Row

key

translation

localeId

1

String: 'key1'

String: 'translation1'

Integer: 1

2

String: 'key2'

String: 'translation2'

Integer: 2

Pipeline configuration

<glossary
    keyField="key"
    translationField="translation"
    localeIdField="localeId"
/>

Output data

spy_glossary_key

id_glossary_key

key

is_active

1

key1

1

2

key2

1

spy_glossary_translation

id_glossary_translation

fk_glossary_key

fk_locale

value

is_active

1

1

1

translation1

1

2

2

2

translation2

1

Example 2

This example uses the optional localizedKeyValuesField. The keyField and translationField have to match the provided array. The localeIdField can be set to any string.

Input data

Row

localizedKeyValues

1

Array: [1 => ['key' => 'key1', 'translation' => 'translation1']]

2

Array: [2 => ['key' => 'key2', 'translation' => 'translation2']]

Pipeline configuration

<glossary
    keyField="key"
    translationField="translation"
    localeIdField="localeId"
    localizedKeyValuesField="localizedKeyValues"
/>

Output data

spy_glossary_key

id_glossary_key

key

is_active

1

key1

1

2

key2

1

spy_glossary_translation

id_glossary_translation

fk_glossary_key

fk_locale

value

is_active

1

1

1

translation1

1

2

2

2

translation2

1