ckanext-validation-schema-generator
This extension helps to generate table schema for a resource based on its content. Support tabular data. You must define a field for datasets and resources to store a table schema data. Check config options below.
Requirements
This extension has been written to work with python 2 and CKAN 2.9.5. Relies on datastore.
Compatibility with core CKAN versions:
| CKAN version |
Compatible? |
| 2.6 and earlier |
not tested |
| 2.7 |
not tested |
| 2.8 |
not tested |
| 2.9.5+ |
yes |
Installation
- Activate your CKAN virtual environment
- Clone the source and install:
pip install -e . && pip install -r requirements.txt
- Add
validation-schema-generator to the ckan.plugins setting in your CKAN config file
- Restart CKAN
Config settings
ckanext.validation_schema_generator.job_timeout = 3600
ckanext.validation_schema_generator.pass_api_key = True
ckanext.validation_schema_generator.api_key =
ckanext.validation_schema_generator.resource_schema_field_name = schema
ckanext.validation_schema_generator.package_schema_field_name = default_data_schema
ckanext.validation_schema_generator.allow_edit_generated_schema = False
API endpoints
vsg_generate - starts the schema generation process
vsg_status - returns status of schema generation for a resource
vsg_update - updates a schema generation task data
vsg_apply - apply a generated schema for a resource or dataset
License
AGPL