Ckan
This is the implementation of the Ckan data handler for MindsDB.
CKAN is a Data Catalogue for Open Data. It stores data in a DataStore. To retrieve data from CKAN, you need to use the CKAN API.
Implementation
You can connect CKAN by creating a CKAN API client. In this handler, you can create a CKAN API client with ckanapi.
Some CKAN instances require you to provide API key. You can find it in the CKAN user panel.
CKAN API client supports all API methods of CKAN. For our handler we use the DataStore API.
The datastore_search_sql
action supports raw SQL commands to be used to search for the data.
Here is an example:
If you installed MindsDB locally via pip, you need to install all handler dependencies manually. To do so, go to the handler’s folder (mindsdb/integrations/handlers/ckan_handler) and run this command: pip install -r requirements.txt
.
Usage
In order to make use of this handler and connect to a Ckan server in MindsDB, the following syntax can be used: