Welcome to Knowage Q&A, where you can ask questions and receive answers from other members of the community.
0 votes
1 view
Hi,

I try to create a new DataSet from a REST service from a FiWare Server.

I configure de JSon Path Items : $..attributes[*].metadata[*] and check the NGSI options. But when i check on preview  i get the error data must be valid JSON Array

The information from the rest servicies is the next:

{
    "contextElement": {
        "entityId": {
            "id": "277",
            "type": null,
            "isPattern": false
        },
        "attributeDomainName": null,
        "domainMetadata": [],
        "attributes": [
            {
                "name": null,
                "type": null,
                "contextValue": null,
                "metadata": [
                    {
                        "name": "timestamp",
                        "type": null,
                        "value": "2018-01-22T09:07:57.994Z"
                    }
                ]
            },
            {
                "name": "MEM_USAGE",
                "type": null,
                "contextValue": null,
                "metadata": [
                    {
                        "name": "signalId",
                        "type": null,
                        "value": "MEM_USAGE"
                    },
                    {
                        "name": "value",
                        "type": null,
                        "value": "41.52595323263406"
                    },
                    {
                        "name": "qBit",
                        "type": null,
                        "value": "0"
                    },
                    {
                        "name": "type",
                        "type": null,
                        "value": "INFO"
                    },
                    {
                        "name": "source",
                        "type": null,
                        "value": "INTER_ANALOG_DST"
                    }
                ]
            },
            {
                "name": "CPU_USAGE",
                "type": null,
                "contextValue": null,
                "metadata": [
                    {
                        "name": "signalId",
                        "type": null,
                        "value": "CPU_USAGE"
                    },
                    {
                        "name": "value",
                        "type": null,
                        "value": "199.0"
                    },
                    {
                        "name": "qBit",
                        "type": null,
                        "value": "0"
                    },
                    {
                        "name": "type",
                        "type": null,
                        "value": "INFO"
                    },
                    {
                        "name": "source",
                        "type": null,
                        "value": "INTER_ANALOG_DST"
                    }
                ]
            },
            {
                "name": "deviceInfo",
                "type": null,
                "contextValue": null,
                "metadata": [
                    {
                        "name": "deviceId",
                        "type": null,
                        "value": "3S_CS_RTU"
                    },
                    {
                        "name": "deviceType",
                        "type": null,
                        "value": "SAITELRTU"
                    }
                ]
            }
        ]
    },
    "statusCode": {
        "code": 200,
        "reasonPhrase": "OK",
        "details": "OK"
    }
}

Any ideas?

Kind Regards
in Data Set by (150 points)

1 Answer

0 votes
 
Best answer

You are using NGSIv1, an outdated version  of Orion, the FIWARE Context Broker.

Knowage is compliant with the current version, which is NGSIv2. Please refer to our doc for more information about Knowage and NGSI:

https://knowage.readthedocs.io/en/latest/user/NGSI/README/index.html

by (15.2k points)
selected by
I'll update the context broker.

Thanks for all.
...