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

[fiware-stackoverflow] Fiware Cygnus PostgreSQL sink does not create table when entity id contains special characters

    Details

      Description

      Created question in FIWARE Q/A platform on 10-11-2020 at 11:11
      Please, ANSWER this question AT https://stackoverflow.com/questions/64767280/fiware-cygnus-postgresql-sink-does-not-create-table-when-entity-id-contains-spec

      Question:
      Fiware Cygnus PostgreSQL sink does not create table when entity id contains special characters

      Description:
      It appears that cygnus-ngsi and its PosgreSQL sink can't create a postgres table when the entity has an id that contains the - chracter, e.g. urn:ngsi-ld:Motion:001 as recommended in the Fiware tutorials.
      I setup a simple stack with Orion, an IoT-Agent as well as Cygnus-NGSI and a PostgreSQL database.
      However, PostgreSQL reports the error
      2020-11-10 08:39:33.404 UTC [66] ERROR: syntax error at or near "-" at character 44
      2020-11-10 08:39:33.404 UTC [66] STATEMENT: CREATE TABLE IF NOT EXISTS openiot.urn_ngsi-ld_motion_001_thing (recvTimeTs text,recvTime text,fiwareServicePath text,entityId text,entityType text,attrName text,attrType text,attrValue text,attrMd text)

      The error does not occur when a different entity id is used.
      Data is then persisted as expected.
      Cygnus should replace non-alphanumeric characters inentity ids with _, however, that does not appear to be happening.
      Is this just a bug or do I need some sort of name mapping to solve this?

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2020-11-11 12:51|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2020-11-11 12:51|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        jason.fox Jason Fox added a comment -

        This is a bug report, not a StackOverflow question - directed user to correct place to file.

        Show
        jason.fox Jason Fox added a comment - This is a bug report, not a StackOverflow question - directed user to correct place to file.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: