Package org.teiid.metadata

Examples of org.teiid.metadata.MetadataStore


     * Metadata for Materialized Views
     * @return
     * @since 4.2
     */
    public static QueryMetadataInterface exampleMaterializedView() {
      MetadataStore metadataStore = new MetadataStore();
        Schema virtModel = createVirtualModel("MatView", metadataStore); //$NON-NLS-1$
        Schema physModel = createPhysicalModel("MatTable", metadataStore); //$NON-NLS-1$
        Schema physModel_virtSrc = createPhysicalModel("MatSrc", metadataStore); //$NON-NLS-1$
       
        Table physTable = createPhysicalGroup("info", physModel); //$NON-NLS-1$
View Full Code Here


 
    @Test public void testCrossSourceStartJoin() throws Exception {
        String sql = "select p.Description, sum(AMOUNT) from s3 p, s2 c, s1 b, o1 f " +
            "where p.PRODUCTID = f.PRODUCT and c.CurrencyCode = f.CURRENCY and b.BOOKID = f.BOOK and b.Name = 'xyz' and c.Name = 'abc' Group by p.Description";
       
        MetadataStore metadataStore = new MetadataStore();
     
        Schema oracle = createPhysicalModel("oracle", metadataStore); //$NON-NLS-1$
        Schema sybase = createPhysicalModel("sybase", metadataStore); //$NON-NLS-1$
       
        // Create physical groups
View Full Code Here

      Table dup1 = mf1.addTable("dup");
     
      mf.addColumn("x", DataTypeManager.DefaultDataTypes.STRING, dup);
      mf1.addColumn("x", DataTypeManager.DefaultDataTypes.STRING, dup1);
     
      MetadataStore ms = mf.getMetadataStore();
      ms.addSchema(mf1.getMetadataStore().getSchemas().values().iterator().next());
     
      server.deployVDB("test", ms, new LinkedHashMap<String, Resource>());
      Connection conn = server.createConnection("jdbc:teiid:test"); //$NON-NLS-1$
     
      Properties importProperties = new Properties();
View Full Code Here

  static FakeServer server = new FakeServer();
 
  @BeforeClass public static void oneTimeSetup() {
      server.setUseCallingThread(true);
      MetadataStore ms = new MetadataStore();
      Schema s = new Schema();
      s.setName("test");
      FunctionMethod function = new FunctionMethod("foo", null, FunctionCategoryConstants.MISCELLANEOUS, PushDown.CANNOT_PUSHDOWN, TestLocalConnections.class.getName(), "blocking", new FunctionParameter[0], new FunctionParameter("result", DataTypeManager.DefaultDataTypes.INTEGER), true, FunctionMethod.Determinism.NONDETERMINISTIC);
      s.addFunction(function);
      ms.addSchema(s);
      server.deployVDB("test", ms, new LinkedHashMap<String, Resource>());
  }
View Full Code Here

   public static TransformationMetadata example1() {
     return example1(true);
   }

   public static TransformationMetadata example1(boolean allUpdatable) {
     MetadataStore metadataStore = new MetadataStore();
   
     // Create models
    Schema pm1 = RealMetadataFactory.createPhysicalModel("pm1", metadataStore); //$NON-NLS-1$
    Schema vm1 = RealMetadataFactory.createVirtualModel("vm1", metadataStore);   //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.teiid.metadata.MetadataStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.