OData endpoint; fork optimized for Tableau Public
by OpenGov

============= ckanext-odata =============

This CKAN extension provides a basic OData 3.0 endpoint for CKAN. This allows it to talk to tools like the FREE Tableau Public for awesome visualizations using data from CKAN!

The endpoint requires data to be held in the CKAN Datastore. An OData Endpoint link is added to resources, showing up as an additional endpoint when the Data API button is pressed.


This fork supports the following OData parameters:

  • $skip - number of records to skip from top (default: 0)
  • $top - number of records to return (default:500)

The OData standard also specifies support for the $filter clause. However, implementing one is non-trivial as its a dialect that doesn’t directly map to PostgreSQL.

Instead, we implemented a $sqlfiter clause, where the user can specify a PostgreSQL where clause. In our view, this is actually a more powerful implementation as the user has full access to PostgreSQL’s filtering capabilities which is a superset of the OData $filter clause.

Note: $sqlfilter is mutually exclusive to the $skip and $top parameters, as you can specify skip/top functionality using SQL primitives (e.g. $top -> limit in SQL; $skip -> offset in SQL)


Installation as standard for CKAN. This extension can be enabled by adding odata to the plugin line in the CKAN configuration file.

Recent Activity