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

xml encoding/decoding destroys a sql query for Transformation in a view model

    Details

    • Steps to Reproduce:
      Hide

      1. Create a new Teiid Project
      2. Create a source/view model which uses csv file
      3. Open a transformation editor, and fix the query like this:

      before:
      ===
      SELECT
      A.a, A.b, A.c
      FROM
      (EXEC SourceModel.getTextFiles('sample.csv')) AS f, TEXTTABLE(f.file COLUMNS a string, b string, c string HEADER) AS A
      ===

      after:
      ===
      SELECT
      A.a, A.b, A.c
      FROM
      (EXEC SourceModel.getTextFiles('sample.csv')) AS f, TEXTTABLE(f.file COLUMNS a string, b string, c string ESCAPE '\u0000' HEADER) AS A
      ===

      4. save the projects and shutdown JBDS
      5. Reboot JBDS and open the view model

      Actual results:
      Can not open the view model

      Expected results:
      User can open the view model, and the fixed sql is still there.

      Show
      1. Create a new Teiid Project 2. Create a source/view model which uses csv file 3. Open a transformation editor, and fix the query like this: before: === SELECT A.a, A.b, A.c FROM (EXEC SourceModel.getTextFiles('sample.csv')) AS f, TEXTTABLE(f.file COLUMNS a string, b string, c string HEADER) AS A === after: === SELECT A.a, A.b, A.c FROM (EXEC SourceModel.getTextFiles('sample.csv')) AS f, TEXTTABLE(f.file COLUMNS a string, b string, c string ESCAPE '\u0000' HEADER) AS A === 4. save the projects and shutdown JBDS 5. Reboot JBDS and open the view model Actual results: Can not open the view model Expected results: User can open the view model, and the fixed sql is still there.

      Description

      In a sql query for transformation in a view model, If user writes "ESCAPE '\u0000'" and save it, it will saved as "ESCAPE '�'" and can not open the view model anymore with parse exception.

      The reason why user wants to set "ESCAPE '\u0000' is a workaround for this jira ticket, TEIIDDES-2217.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                phantomjinx Paul Richardson
                Reporter:
                hisao.furuichi Hisao Furuichi
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: