<commit_before>=============
ckanext-odata
=============

This CKAN extension provides a basic OData 3.0 endpoint for CKAN.

The endpoint requires data to be held in the CKAN Datastore.
An _OData Endpoint_ link is added to resources on their main dataset page.

Installation
------------

Installation as standard for CKAN.
This extension can be enabled by adding `odata` to the `plugin` line
in the CKAN configuration file.
<commit_msg>Added usage details about optional parameters<commit_after>=============
ckanext-odata
=============

This CKAN extension provides a basic OData 3.0 endpoint for 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.

Usage
-----
This implementation supports the following [OData parameters](http://www.odata.org/documentation/odata-version-3-0/odata-version-3-0-core-protocol/):
* $skip - number of records to skip from top (default: 0)
* $top - number of records to return (default:500)

The OData protocol also has support 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 use can specify a PostgreSQL where clause.  In our view, this is actually a more powerful implementation as you have full access to PostgreSQL's filtering capabilities which is a superset of the OData $filter clause.


Installation
------------

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

{'fraction_non_alphanumeric': 0.09546827794561934, 'fraction_numerical': 0.0072507552870090634, 'mean_word_length': 4.257142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '546496', 'n_tokens_mistral': 454, 'n_tokens_neox': 427, 'n_words': 225}