... | @@ -95,9 +95,23 @@ The `nnn` in these column names is a zero-based index: the first survey's data a |
... | @@ -95,9 +95,23 @@ The `nnn` in these column names is a zero-based index: the first survey's data a |
|
|
|
|
|
By convention, the import routine runs as a member of access group `PullCastor`, which is [authorized](https://gitlab.pep.cs.ru.nl/pep-public/user-docs/-/wikis/Access-control#data-access) to store data into a column group named `Castor`. Since the access group can store data but not create columns, Data Administrator must ensure that appropriate columns have been made available before the import is attempted. If Castor contains data that should be stored into a column (with a name) that does not exist, the import process will fail. Data Administrator can use the [`pepcli castor` command](https://gitlab.pep.cs.ru.nl/pep-public/user-docs/-/wikis/Using-pepcli#castor) to determine names of required columns, and to create those columns.
|
|
By convention, the import routine runs as a member of access group `PullCastor`, which is [authorized](https://gitlab.pep.cs.ru.nl/pep-public/user-docs/-/wikis/Access-control#data-access) to store data into a column group named `Castor`. Since the access group can store data but not create columns, Data Administrator must ensure that appropriate columns have been made available before the import is attempted. If Castor contains data that should be stored into a column (with a name) that does not exist, the import process will fail. Data Administrator can use the [`pepcli castor` command](https://gitlab.pep.cs.ru.nl/pep-public/user-docs/-/wikis/Using-pepcli#castor) to determine names of required columns, and to create those columns.
|
|
|
|
|
|
### Character mangling
|
|
### Name mangling
|
|
|
|
|
|
@@@ more here @@@
|
|
Due to technical limitations, PEP column names may contain only
|
|
|
|
|
|
|
|
- basic alphabetic characters: uppercase `A` through `Z` and lowercase `a` through `z`.
|
|
|
|
- digits `0` through `9`.
|
|
|
|
- the underscore `_` character.
|
|
|
|
- the period (full stop) `.` character.
|
|
|
|
|
|
|
|
By convention, the period character `.` is used to split column names into separate sections. This principle is also applied during Castor import: names of different Castor entities are concatenated using a period `.` delimiter.
|
|
|
|
|
|
|
|
The import process applies name mangling to strip Castor names of disallowed characters before being used as PEP column name sections:
|
|
|
|
|
|
|
|
- all whitespace characters are replaced by an underscore character, and
|
|
|
|
- all remaining disallowed characters are dropped from the name.
|
|
|
|
|
|
|
|
To ensure that the period `.` character only appears as a section delimiter in generated column names, it too is dropped from Castor names when determining the column name section.
|
|
|
|
|
|
### Column name mappings
|
|
### Column name mappings
|
|
|
|
|
... | @@ -105,4 +119,6 @@ PEP imports Castor data into columns based on the names of Castor entities. But |
... | @@ -105,4 +119,6 @@ PEP imports Castor data into columns based on the names of Castor entities. But |
|
|
|
|
|
Mappings apply to the individual sections of Castor import column names. If PEP encounters a mapped Castor name during import, it bases the column name on the configured replacement instead of the raw Castor name. For example, a Castor survey step might be called `01. Demografische vragen voor de mantelzorger` (which translates to "01. Demographic questions for the caregiver"). Data Administrator could use [the `pepcli castor column-name-mapping` command](https://gitlab.pep.cs.ru.nl/pep-public/user-docs/-/wikis/Using-pepcli#castor-column-name-mapping) to introduce a mapping to use the `CgDemog` moniker instead of the long and descriptive Dutch original.
|
|
Mappings apply to the individual sections of Castor import column names. If PEP encounters a mapped Castor name during import, it bases the column name on the configured replacement instead of the raw Castor name. For example, a Castor survey step might be called `01. Demografische vragen voor de mantelzorger` (which translates to "01. Demographic questions for the caregiver"). Data Administrator could use [the `pepcli castor column-name-mapping` command](https://gitlab.pep.cs.ru.nl/pep-public/user-docs/-/wikis/Using-pepcli#castor-column-name-mapping) to introduce a mapping to use the `CgDemog` moniker instead of the long and descriptive Dutch original.
|
|
|
|
|
|
Note that if a mapping is configured, it applies to all Castor entities with the same ([mangled](#character-mangling)) name. For example, when Data Administrator introduces a mapping for a survey step named `Stap 2`, the mapping will also be applied to all other entities (surveys, phases, steps etc.) with that same name. |
|
If a mapping is configured, it applies to all Castor entities with the same name. For example, when Data Administrator introduces a mapping for a survey step named `Stap 2`, the mapping will also be applied to all other entities (surveys, phases, steps etc.) with that same name. Data Administrator should be aware that, when a mapping is introduced, differently named columns may be needed for the import of multiple Castor studies and/or data types.
|
|
\ No newline at end of file |
|
|
|
|
|
Note that column name mappings are configured for [mangled](#name-mangling) names rather than raw names. Castor entities named @@@ example @@@ and @@@ example @@@ would therefore be subject to the same mapping, since both are mangled to @@@ example @@@. |
|
|
|
\ No newline at end of file |