3 Replies Latest reply on Jan 31, 2013 10:01 AM by sanjeev.gour

    Problem in continuous execution with alter view command when used together?

    sanjeev.gour

      We issue a continuous query to a view that unions a number of SQLs together. This works fine until we issue an alter view command on this view. On alter view we only union more SQLs to the view definition or remove some SQLs from it. The continuous query does not seem to pick up these changes and keeps on returning data based on the same view definition that was avaialble at the time of starting the continuous query. The changes are picked up when we restart the continuous query.

       

      Here is an example-

       

      Vew Definition

       

      select a, b, c from t1

      UNION

      select a, b, c from t2

       

      Suppose this gave you the data as-

       

      a     b     c

      a1   b1   c1

      a2   b2   c2 

       

      Now the view definition is changed to include another UNION like this-

       

      select a, b, c from t1

      UNION

      select a, b, c from t2

      UNION

      select a, b, c from t3

       

      The expectation is that we will recieve the data as-

      a     b     c

      a1   b1   c1

      a2   b2   c2 

      a3   b3   c3

       

      However, the result still comes as-

       

      a     b     c

      a1   b1   c1

      a2   b2   c2 

       

      The same behavior is observed when we remove a UNION from the view definition, it is not reflected.

       

      If we query the same view from the Datasource explorer it gives the correct result. That indicates that the continuous query is not seeing this change in the view definition.

       

      Is there something we need to set such that teiid picks up this change ?