GlossaryLoader

The GlossaryLoader processes and manages glossary keys and translations using Flow ETL and the BulkWriterFacade. It loads given rows to the spy_glossary_key and spy_glossary_translation tables. 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 the translation table.

glossary/@localeIdField

Attribute

Name of the field containing the fk_locale for the translation table.

glossary/@localizedKeyValuesField (optional)

Attribute

Name of the field containing the localized key values.

glossary/@disablePublishEvents (optional)

Attribute

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

keyField

translationField

localeIdField

1

String: key1

String: translation1

Integer: 1

2

String: key2

String: translation2

Integer: 2

Pipeline configuration

<glossary
    keyField="keyField"
    translationField="translationField"
    localeIdField="localeIdField"
/>

Database output

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

Pipeline output

Row

key

translation

localeId

1

String: key1

String: translation1

Integer: 1

2

String: key2

String: translation2

Integer: 2

Example 2

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

Input data

Row

localizedKeyValuesField

1

Array: {1: {"key": "key1", "translation": "translation1"}}

2

Array: {2: {"key": "key2", "translation": "translation2"}}

Pipeline configuration

<glossary
    keyField="keyField"
    translationField="translationField"
    localeIdField="localeIdField"
    localizedKeyValuesField="localizedKeyValuesField"
/>

Database output

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

Pipeline output

Row

key

translation

localeId

1

String: key1

String: translation1

Integer: 1

2

String: key2

String: translation2

Integer: 2