CKAN extension for generating data in IATI format. It was developed by BCIE (Banco Centroamericano de Integración Económica) and the Open Knowledge Foundation (OKFN).
Useful extension to transform CKAN resources into IATI XML format.
This CKAN extension relies on the okfn_iati Python library
Compatibility with core CKAN versions:
| CKAN version | Compatible? |
|---|---|
| 2.10 | Yes |
| 2.11 | Yes |
- Activate your CKAN virtual environment, for example:
pip install git+https://github.com/okfn/ckanext-iati-generator.git
- Install the extension requirements:
pip install -r https://raw.githubusercontent.com/okfn/ckanext-iati-generator/refs/heads/main/requirements.txt
- Add
iati_generatorto theckan.pluginssetting in your CKAN configuration file.
ckan.plugins = ... iati_generator
- Run the database migration:
ckan db upgrade -p iati_generator
These are the configuration settings that can be set in your ckan.ini file:
# rows_limit is the maximum number of rows to be processed in a single IATI generation request.
ckanext.iati_generator.rows_limit = 50000 # default is 50000
# max_allowed_failures is the maximum number of failures in rows before canceling the IATI generation request.
ckanext.iati_generator.max_allowed_failures = 10 # default is 10
Extra fields: Revisar documentacion completa AQUI
This extension requires resource extras:
iati_namespace: If you plan to expose more than one IATI file group, define a custom namespace per each IATI file. If you plan to have only one IATI file group (organization + activities files), leave this emptyiati_file_typeA selector for the specific IATI file type (e.g., base organization file, names file, org documents file, etc)
If you are using the scheming extension, add this to your schema yaml file
...
resource_fields:
...
# --- IATI fields ---
- field_name: iati_namespace
label:
en: IATI namespace
es: Espacio de nombres IATI
help_text:
en: Leave empty for a single IATI file environment.
es: Dejar vacío para un entorno con un solo archivo IATI.
form_placeholder: eg. XM-DAC-46002 or my-org
validators: ignore_missing
- field_name: iati_file_type
label:
en: IATI file type
es: Tipo de archivo IATI
preset: select
# Helper exposed by this extension that returns [{'value','label'}, ...]
choices_helper: iati_file_type
validators: ignore_missingIf you are not using the scheming extension: TODO update the schema manually. We will fix/document this in a future version