Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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
    titleStandard Select
     http://{host}/rds/catalog/test/testStats/select
    Code Block
    titleStandard Select Output
    collapsetrue
    {
        "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
    titleDenodo Select
     http://{host}/rds/catalog/test/testStats/select?format=denodo
    Code Block
    titleDenodo Output
    collapsetrue
    {
        "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
    titleDenodo Select With Metadata
     http://{host}/rds/catalog/test/testStats/select?format=denodo&metadata
    Code Block
    titleDenodo Output With Metadata
    collapsetrue
    {
        "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": []
    }