... | @@ -172,13 +172,13 @@ The `castor` command's various sub-commands are used to interact with PEP's [Cas |
... | @@ -172,13 +172,13 @@ The `castor` command's various sub-commands are used to interact with PEP's [Cas |
|
|
|
|
|
### `castor list-import-columns`
|
|
### `castor list-import-columns`
|
|
|
|
|
|
This command lists the columns that may be needed when the specified Castor data are [imported into PEP](https://gitlab.pep.cs.ru.nl/pep-public/user-docs/-/wikis/Castor-integration#import). Since the import process cannot create columns itself, Data Administrator must create required columns beforehand. This command is usable to find out which columns are needed. The command must be invoked with the `--sp-column` switch, specifying the column containing short pseudonym values that correspond with the Castor study's record IDs. E.g.:
|
|
This command lists the columns that are needed when the specified Castor data are [imported into PEP](https://gitlab.pep.cs.ru.nl/pep-public/user-docs/-/wikis/Castor-integration#import). Since the import process cannot create columns itself, Data Administrator must create required columns beforehand. (S)he then uses this command to find out which columns are needed. The command must be invoked with the `--sp-column` switch, specifying the column containing short pseudonym values that correspond with the Castor study's record IDs. E.g.:
|
|
|
|
|
|
```
|
|
```
|
|
pepcli castor list-import-columns --sp-column ShortPseudonym.Visit1.Castor.HomeQuestionnaires`
|
|
pepcli castor list-import-columns --sp-column ShortPseudonym.Visit1.Castor.HomeQuestionnaires`
|
|
```
|
|
```
|
|
|
|
|
|
While the output lists the columns that will be needed by the import process, this command does not create them. Use the [`castor create-import-columns` comamnd](#castor-create-import-columns) instead to have the columns created instead of just listed. Alternatively, Data Administrator can `castor list` the columns, then use [`ama column`](#ama-column)'s `create` and `addTo` commands to create them and group them into the `Castor` column group.
|
|
While the output lists the columns that will be needed by the import process, missing columns are not created by this command. Use the [`castor create-import-columns` command](#castor-create-import-columns) instead to have the columns created instead of just listed. Alternatively, Data Administrator can `castor list` the columns, then invoke [`ama column`](#ama-column)'s `create` and `addTo` commands manually to create the columns and group them into the `Castor` column group.
|
|
|
|
|
|
The `castor list-import-columns` command accepts two optional switches:
|
|
The `castor list-import-columns` command accepts two optional switches:
|
|
|
|
|
... | @@ -187,7 +187,23 @@ The `castor list-import-columns` command accepts two optional switches: |
... | @@ -187,7 +187,23 @@ The `castor list-import-columns` command accepts two optional switches: |
|
|
|
|
|
### `castor create-import-columns`
|
|
### `castor create-import-columns`
|
|
|
|
|
|
@@@ more here @@@
|
|
This command ensures that all columns exist that will be needed when the specified Castor data are [imported into PEP](https://gitlab.pep.cs.ru.nl/pep-public/user-docs/-/wikis/Castor-integration#import). Since the import process cannot create columns itself, Data Administrator can use this command to create them beforehand. When invoked without further parameters, the command creates missing columns for all Castor data that will be imported. Each created column is also automatically added to the `Castor` column group, ensuring that the column is writable to the import process:
|
|
|
|
|
|
|
|
```
|
|
|
|
pepcli castor create-import-columns
|
|
|
|
```
|
|
|
|
|
|
|
|
The above switch-less invocation may lack information required to create import columns for some short pseudonym columns. These will be reported, and the command can then be invoked with switches to create columns for data import from affected Castor studies:
|
|
|
|
|
|
|
|
- the `--sp-column` switch specifies the column containing short pseudonym values that correspond with the Castor study's record IDs.
|
|
|
|
- when survey data are to be imported from the Castor study, and there is a survey package containing more than 10 surveys, the `--xml-structure-file` switch must be passed to work around a Castor bug that prevents `pepcli` from being able to list import columns. The Castor administrator should [export](https://helpdesk.castoredc.com/article/170-export-and-import-the-form-structure) the survey package structures from the Castor Web interface, which yields an XML file. The path to this XML file must then be passed to the `--xml-structure-file` switch to allow import columns to be created.
|
|
|
|
- when data are to be imported from surveys that are answered multiple times by participants, the `--answer-set-count` must be used to indicate how many answer sets are toe be expected. For example, if participants will answer a survey a maximum of 10 times, specify `--answer-set-count 10` to have the command create sufficient column names for all survey answers to be imported.
|
|
|
|
|
|
|
|
E.g. when a Castor study is bound to short pseudonym column `ShortPseudonym.Covid.Castor.CovidQuestionnaires`, and that study contains large survey packages that are answered up to 30 times:
|
|
|
|
|
|
|
|
```
|
|
|
|
pepcli castor create-import-columns --sp-column ShortPseudonym.Covid.Castor.CovidQuestionnaires --answer-set-count 30 --xml-structure-file C:\Users\Gonk\Desktop\CastorExport.xml
|
|
|
|
```
|
|
|
|
|
|
### `castor list-sp-columns`
|
|
### `castor list-sp-columns`
|
|
|
|
|
... | | ... | |