Problem
When a dataset is harvested by an aggregator portal (e.g. dati.gov.it), the ckan_list_resources tool reports DataStore: No even when the DataStore is active on the source portal.
Real example
Querying "Rilevazione qualità aria 2025" (Comune di Milano) on dati.gov.it:
ckan_list_resources → DataStore: No
- Same dataset on
dati.comune.milano.it → DataStore: Yes ✓
The resource download URL already contains the source portal domain, dataset ID, and resource ID:
https://dati.comune.milano.it/dataset/f02f7e96.../resource/9010ac16.../download/...
So the information needed to check the source portal is already available in the metadata.
Proposed Solution
When datastore_active is false/null on a resource, inspect the download URL. If the domain differs from server_url, attempt a DataStore lookup on the source portal using the extracted resource ID, and report the result alongside the original resource metadata.
New optional parameter check_source_portal (boolean, default true) on ckan_list_resources.
New fields in response: source_datastore_active, source_portal_url.
Spec
Full proposal and scenarios in OpenSpec change:
openspec/changes/add-source-portal-datastore-fallback/
Problem
When a dataset is harvested by an aggregator portal (e.g.
dati.gov.it), theckan_list_resourcestool reportsDataStore: Noeven when the DataStore is active on the source portal.Real example
Querying "Rilevazione qualità aria 2025" (Comune di Milano) on
dati.gov.it:ckan_list_resources→DataStore: Nodati.comune.milano.it→DataStore: Yes✓The resource download URL already contains the source portal domain, dataset ID, and resource ID:
So the information needed to check the source portal is already available in the metadata.
Proposed Solution
When
datastore_activeis false/null on a resource, inspect the download URL. If the domain differs fromserver_url, attempt a DataStore lookup on the source portal using the extracted resource ID, and report the result alongside the original resource metadata.New optional parameter
check_source_portal(boolean, defaulttrue) onckan_list_resources.New fields in response:
source_datastore_active,source_portal_url.Spec
Full proposal and scenarios in OpenSpec change:
openspec/changes/add-source-portal-datastore-fallback/