0 Replies Latest reply on Sep 6, 2013 12:41 PM by Mark Addleman

    Making model/schema name available in the execution context

    Mark Addleman Master

      I'm writing a delegating translator to apply common caching and continuous execution logic across many translators, including existing ones.  One of our use cases is to invalidate the cache and call ExecutionContext.dataAvailable() when an event occurs.  In order to use this delegating translator with existing translators, I'm thinking of creating a separate Teiid view that contains three columns, schema name, table name (in source) and an invalidation/data available query.  The delegating translator would connect back into Teiid, querying this view for all of the UnaryFromClauses in the incoming query and issue a continuous query against SELECT 1 WHERE EXISTS ($queryFromLookup).  When it receives a result set, it will invalidate the cache and calls dataAvailable(). 


      I think the only missing piece to this is making the model/schema name available int he execution context to look up the invalidation/data available query.