Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-22509

[fiware-stackoverflow] How to get the missing table Schema while using quantumleap in cratedb using orion LD context broker though the subscriptions are working?

    Details

      Description

      Created question in FIWARE Q/A platform on 04-10-2023 at 14:10
      Please, ANSWER this question AT https://stackoverflow.com/questions/77230581/how-to-get-the-missing-table-schema-while-using-quantumleap-in-cratedb-using-ori

      Question:
      How to get the missing table Schema while using quantumleap in cratedb using orion LD context broker though the subscriptions are working?

      Description:
      {
      "cols": [
      "schema_name"
      ],
      "rows": [
      [
      "blob"
      ],
      [
      "doc"
      ],
      [
      "information_schema"
      ],
      [
      "pg_catalog"
      ],
      [
      "sys"
      ]
      ],
      "rowcount": 5,
      "duration": 7.289699
      }

      http://crate/_sql

      {"stmt":"SHOW SCHEMAS"}

      for read schemas. you can see there is no schema formed in "mtmytenant" (my service hearder is mytenant).
      now see the below. You can see the subscribtion but there is no table schema. BUt i get all the subscribed sensor values.

      {"stmt":"SHOW TABLES"}

      {
      "cols": [
      "table_name"
      ],
      "rows": [
      [
      "etdummydevice1"
      ],
      [
      "etdummydevice2"
      ],
      [
      "md_ets_metadata"
      ]
      ],
      "rowcount": 3,
      "duration": 24.486307
      }

      According to the doc https://ngsi-ld-tutorials.readthedocs.io/en/latest/time-series-data.html ,

      Schema names are formed with the mt prefix followed by NGSILD-Tenant header in lower case. The IoT Agent is forwarding measurements from the dummy IoT devices, with the NGSILD-Tenant header openiot. These are being persisted under the mtopeniot schema.
      If the mtopeniot does not exist, then the subscription to QuantumLeap has not been set up correctly. Check that the subscription exists, and has been configured to send data to the correct location.
      here openiot is the header.

      Post with headers NGSILD-Tenant=mytenant, Content-Type=application/ld+json
      http://localhost:1026/ngsi-ld/v1/subscriptions/
      {
      "description": "Notify me of Dummydevice1 changes",
      "type": "Subscription",
      "entities": [

      {"type": "Dummydevice1"}

      ],
      "watchedAttributes": ["pilot_temperature"],
      "notification": {
      "attributes": ["location", "pilot_temperature"],
      "format": "normalized",
      "endpoint":

      { "uri": "http://quantumleap:8668/v2/notify", "accept": "application/json" }

      },
      "@context": "http://context:3000/data-models/ngsi-context.jsonld"
      }

      This works perfectly with NSGI v2 I am getting all the table schemas but with NGSI LD it is a bit problem. If anyone solved this. As in the tutorial if I did, still the schema names are not formed, but it does in the tutorials

        Activity

        backlogmanager Backlog Manager created issue -
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        backlogmanager Backlog Manager made changes -
        HD-Enabler Unknown [ 10910 ]
        HD-Chapter Unknown [ 10845 ]
        HD-Node Unknown [ 10852 ]
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        fla Fernando Lopez made changes -
        Assignee Jason Fox [ jason.fox ]
        jason.fox Jason Fox made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]

          People

          • Assignee:
            jason.fox Jason Fox
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: