Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-2554

Import of REST service with columns set to 'integer' type results in "Expected biginteger, but was integer."

XMLWordPrintable

    • Hide

      1) Import posts service from http://jsonplaceholder.typicode.com
      a) Connection URL: "http://jsonplaceholder.typicode.com/posts"
      b) Response Type is JSON
      c) Added a parameter of "id" with Type "URI" and a default value of "1"
      2) New View Procedure Name: "postById"
      3) Add all elements
      4) Set "id" and "userId" to integer data type
      5) Finish import wizard
      6) Run preview on "postById" procedure using value of "1"

      Show
      1) Import posts service from http://jsonplaceholder.typicode.com a) Connection URL: "http://jsonplaceholder.typicode.com/posts" b) Response Type is JSON c) Added a parameter of "id" with Type "URI" and a default value of "1" 2) New View Procedure Name: "postById" 3) Add all elements 4) Set "id" and "userId" to integer data type 5) Finish import wizard 6) Run preview on "postById" procedure using value of "1"

      Importing posts service from http://jsonplaceholder.typicode.com results in "Expected biginteger, but was integer." runtime error when previewing procedure. This appears to be an issue with the type assignments on the model as a dynamic VDB using the same invocation executes properly. Also seems similar to the issue described in TEIIDDES-2438.

      Full error is:
      org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.api.exception.query.QueryPlannerException: TEIID30492 TEIID31121 The expected result set of the procedure ViewModel.postById does not match the result set from returnable statement SELECT A.id AS id, A.userId AS userId, A.title AS title, A.body AS body FROM (EXEC SourceModel.invokeHttp(action => 'GET', endpoint => VARIABLES.qp, stream => 'TRUE')) AS f, XMLTABLE('/response' PASSING JSONTOXML('response', f.result) COLUMNS id integer PATH 'id/text()', userId integer PATH 'userId/text()', title string PATH 'title/text()', body string PATH 'body/text()') AS A; use WITHOUT RETURN to indicate the statement should not be returned - The definition for ViewModel.postById has the wrong type for column 1. Expected biginteger, but was integer.

              rhn-engineering-tejones Edwin Jones
              rhn-support-mshirley Marc Shirley (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: