Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set the cod_level key #47

Open
cjhendrix opened this issue Dec 17, 2024 · 2 comments
Open

Unable to set the cod_level key #47

cjhendrix opened this issue Dec 17, 2024 · 2 comments
Assignees

Comments

@cjhendrix
Copy link
Contributor

cjhendrix commented Dec 17, 2024

******************************************
* HDX CLI toolkit - Update               *
* Invoked at: 2024-12-17T08:04:37.757588 *
******************************************
hdx_stage_site
Found 1 datasets for organization 'OCHA Field Information Services Section (FISS) (ocha-fiss)' matching filter conditions:
Updating key 'cod_level' with value 'cod-standard'
Type name '' is not recognised, aborting

From IH: "It looks like the issue is in the understanding the data type of the cod_level value. I notice that the cod_level key is not in the JSON which you can download from the dataset page but is in the package_show response. My suspicion is that this is a "special" key."

Also please consider if it is possible to unset the key.

@IanHopkinson IanHopkinson self-assigned this Dec 17, 2024
@IanHopkinson
Copy link
Collaborator

IanHopkinson commented Jan 25, 2025

The issue here is that because the cod_level does not exist on the dataset we are unable to infer the correct type for it which is the what the error message on the final line is telling us.

There are two workarounds for this:

  1. We could maintain a list of types for dataset attributes
  2. We could allow users to supply the type for the attributes

I don't think we can provide all attributes as strings and let HDX/CKAN do any required type conversion

Providing the output from the toolkit for an issue is really useful, it would be handy to also provide the command which generated the output for testing purposes.

@cjhendrix
Copy link
Contributor Author

cjhendrix commented Jan 28, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants