use of org.teiid.translator.couchbase.CouchbaseMetadataProcessor.Dimension in project teiid by teiid.
the class TestCouchbaseMetadataProcessor method testComplexJson.
@Test
public void testComplexJson() throws ResourceException {
CouchbaseMetadataProcessor mp = new CouchbaseMetadataProcessor();
MetadataFactory mf = new MetadataFactory("vdb", 1, "couchbase", SystemMetadata.getInstance().getRuntimeTypeMap(), new Properties(), null);
Table table = createTable(mf, KEYSPACE, KEYSPACE);
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, complexJson(), mf, table, KEYSPACE, false, new Dimension());
helpTest("complexJson.expected", mf);
}
use of org.teiid.translator.couchbase.CouchbaseMetadataProcessor.Dimension in project teiid by teiid.
the class TestCouchbaseMetadataProcessor method testCustomerOrderWithTypedName.
@Test
public void testCustomerOrderWithTypedName() throws ResourceException {
CouchbaseMetadataProcessor mp = new CouchbaseMetadataProcessor();
mp.setTypeNameList("`test`:`type`,`beer-sample`:`type`,` travel-sample`:`type`");
MetadataFactory mf = new MetadataFactory("vdb", 1, "couchbase", SystemMetadata.getInstance().getRuntimeTypeMap(), new Properties(), null);
Table customer = createTable(mf, KEYSPACE, "Customer");
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, formCustomer(), mf, customer, customer.getName(), false, new Dimension());
Table order = createTable(mf, KEYSPACE, "Oder");
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, formOder(), mf, order, order.getName(), false, new Dimension());
helpTest("customerOrderTypedName.expected", mf);
}
use of org.teiid.translator.couchbase.CouchbaseMetadataProcessor.Dimension in project teiid by teiid.
the class TestCouchbaseMetadataProcessor method testJsonNestedArray.
@Test
public void testJsonNestedArray() throws ResourceException {
CouchbaseMetadataProcessor mp = new CouchbaseMetadataProcessor();
MetadataFactory mf = new MetadataFactory("vdb", 1, "couchbase", SystemMetadata.getInstance().getRuntimeTypeMap(), new Properties(), null);
Table table = createTable(mf, KEYSPACE, KEYSPACE);
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, complexJsonNestedArray(), mf, table, KEYSPACE, false, new Dimension());
helpTest("complexJsonNestedArray.expected", mf);
}
use of org.teiid.translator.couchbase.CouchbaseMetadataProcessor.Dimension in project teiid by teiid.
the class TestCouchbaseMetadataProcessor method testCustomerOrderMultiple.
@Test
public void testCustomerOrderMultiple() throws ResourceException {
CouchbaseMetadataProcessor mp = new CouchbaseMetadataProcessor();
MetadataFactory mf = new MetadataFactory("vdb", 1, "couchbase", SystemMetadata.getInstance().getRuntimeTypeMap(), new Properties(), null);
Table table = createTable(mf, KEYSPACE, KEYSPACE);
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, formCustomer(), mf, table, KEYSPACE, false, new Dimension());
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, formOder(), mf, table, KEYSPACE, false, new Dimension());
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, formCustomer(), mf, table, KEYSPACE, false, new Dimension());
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, formOder(), mf, table, KEYSPACE, false, new Dimension());
helpTest("customerOrder.expected", mf);
}
use of org.teiid.translator.couchbase.CouchbaseMetadataProcessor.Dimension in project teiid by teiid.
the class TestCouchbaseMetadataProcessor method testCustomerWithDuplicatedTypedName.
@Test
public void testCustomerWithDuplicatedTypedName() throws ResourceException {
CouchbaseMetadataProcessor mp = new CouchbaseMetadataProcessor();
mp.setTypeNameList("`test`:`type`,`test2`:`type`");
MetadataFactory mf = new MetadataFactory("vdb", 1, "couchbase", SystemMetadata.getInstance().getRuntimeTypeMap(), new Properties(), null);
String typedName = "Customer";
String keyspace1 = "test";
String keyspace2 = "test2";
Table table1 = createTable(mf, keyspace1, typedName);
mp.scanRow("test", KEYSPACE_SOURCE, formCustomer(), mf, table1, table1.getName(), false, new Dimension());
Table table2 = createTable(mf, keyspace2, typedName);
mp.scanRow("test2", "`test2`", formCustomer(), mf, table2, table2.getName(), false, new Dimension());
helpTest("customerDuplicatedTypedName.expected", mf);
}
Aggregations