3 Replies Latest reply on Apr 22, 2016 10:38 AM by rareddy

    Not able to fetch updated schema or not able to read latest values of data source.

    nish18

      Hi ,

      When I read data from employee table of mysql database or any other data source with the help of vdb , it shows 10 records of employee table.

      then I insert one record using VDB in employee table , it get inserted properly. I can see it got inserted in mysql database.

       

      But when I again try to read data through VDB ,it still shows 10 records. I think Teiid maintain cache somewhere and it fetches that only.

      Same is the case with schema , it doesn't fetch latest schema.

       

      Please some one guide me on this, how can I fetch schema/data latest everytime

        • 1. Re: Not able to fetch updated schema or not able to read latest values of data source.
          rareddy

          Nishant,

           

          If you are using resultset caching like

           

          /*+cache*/ select  * from employee

           

          or you tuned on the materialization on the "employee" table, then the results would be cached and served the next time from cache, otherwise the query will always go the source to fetch the results.

           

          As far as schema, if you are using the Dynamic VDB with native metadata loader (default), the schema is fetched during the deploy time and will be cached for the life of the VDB or until server restarts. There is an option to cache this schema to survive the server restarts too. If you are using the Designer based VDB, then schema is fetched during the development time and will be same until the VDB itself is updated with new updates.

           

          HTH. Let us know if you have any questions.

           

          Ramesh..

          • 2. Re: Not able to fetch updated schema or not able to read latest values of data source.
            nish18

            Thanks Ramesh ,

            So does it mean that after deploying VDB , if schema changes, we need to deploy VDB  again or restart a server , or we can still fetch a latest schema without deploying or restarting server ?

            • 3. Re: Not able to fetch updated schema or not able to read latest values of data source.
              rareddy

              If you are using the Dynamic VDB, with native metadata loader (i.e. did not hard code the DDL in the file), then you can use Admin API's restartVDB method, to reload a particular model, however this amounts to a re-deploy of a VDB. If the concern is, existing users connected to the old VDB, there is provision to not dis-connect all those users, but move them to the updated VDB as along the VDB name is same.

               

              Ramesh..