...
Denodo is a powerful data virtualization platform that provides its users with a JSON format of query results that are accessed through its REST API. We seek to provide users with the Denodo JSON format in an effort to allow them to quickly integrate RDS output into existing applications designed to work against the Denodo JSON format. The only difference is that users can still include our metadata if desired using the metadata parameter.
...
Denodo Compliant Data
- In this example we will assume we have a collection "test" and view "view" created with the variables "salary","category", and "weight".
A standard query would look like this:
Code Block title Standard Select http://{host}/rds/catalog/test/testStats/select
Code Block title Standard Select Output collapse true { "records": [ [ 10000, 1, 0.2 ], [ 20000, 2, 0.5 ], [ 152666, 2, 0.75 ] ], "info": { "colOffset": 0, "colCount": 3, "moreCols": false, "format": "MTNA", "includeMetadata": false, "limit": 20, "offset": 0, "moreRows": false } }
By adding the format parameter we can get this output in Denodo's format.
Code Block title Denodo Select http://{host}/rds/catalog/test/testStats/select?format=denodo
Code Block title Denodo Output collapse true { "name": "", "elements": [ { "salary": 10000, "category": 1, "weight": 0.2 }, { "salary": 20000, "category": 2, "weight": 0.5 }, { "salary": 152666, "category": 2, "weight": 0.75 } ], "links": [] }
In addition to the Denodo format, users can also include the MTNA metadata section if desired.
Code Block title Denodo Select With Metadata http://{host}/rds/catalog/test/testStats/select?format=denodo&metadata
Code Block title Denodo Output With Metadata collapse true { "name": "", "metadata": { "variables": { "resources": [ { "id": "salary", "name": "salary", "index": 1, "storageType": "NUMERIC", "displayType": "NUMERIC", "width": 12 }, { "id": "category", "name": "category", "index": 2, "storageType": "NUMERIC", "displayType": "NUMERIC", "width": 10 }, { "id": "weight", "name": "weight", "index": 3, "storageType": "NUMERIC", "displayType": "NUMERIC", "width": 12 } ], "info": { "offset": 0, "more": false, "count": 3 } } }, "elements": [ { "salary": 10000, "category": 1, "weight": 0.2 }, { "salary": 20000, "category": 2, "weight": 0.5 }, { "salary": 152666, "category": 2, "weight": 0.75 } ], "links": [] }