2 Replies Latest reply on Feb 12, 2013 10:31 AM by jane_lj

    Get metadata info while query execution

    jane_lj

      After register metadata into metadataFactory in ExecutionFactory, if I need to access metadata info, e.g. table name, column name and data type in queryexecution class, how to get them?

      Code sample?

       

      Thanks.

        • 1. Re: Get metadata info while query execution
          shawkins

          The pushdown query will contain the metadata objects - for example see org.teiid.language.ColumnReference implements MetadataReference<Column>, which means you can call getMetadataObject() to get the Column.  If you need metadata outside the scope of your query, then use org.teiid.metadata.RuntimeMetadata instance that is passed in when your Execution is created.  It has methods such as getTable(String) that can look up a metadata object based upon the fully qualified Teiid name.

           

          Steve

          • 2. Re: Get metadata info while query execution
            jane_lj

            Thank you, Steven.