[JBoss JIRA] (TEIID-4641) Create upsert/delete refresh support
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-4641:
-------------------------------------
Summary: Create upsert/delete refresh support
Key: TEIID-4641
URL: https://issues.jboss.org/browse/TEIID-4641
Project: Teiid
Issue Type: Sub-task
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
There must be an alternative to the implied default of the table rename strategy - which is problematic when a source is not transactional or even when it is - as a multi-part swap can leave the table non-existent for a brief window or the source may have issues with ddl under an xa transaction - TEIID-4579
This is true for the non-transactional source incremental refresh as well, which is a delete then insert - it leaves the live table briefly in an inconsistent state.
A upsert/delete approach addresses both of these concerns at the expense of performance - especially when the source does not directly support upsert as the engine must implement a compensating procedure. However now that we have pushdown support for upsert, we'll continue to add source support.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4641) Create upsert/delete refresh support
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4641?page=com.atlassian.jira.plugin... ]
Steven Hawkins reassigned TEIID-4641:
-------------------------------------
Assignee: Ramesh Reddy (was: Steven Hawkins)
> Create upsert/delete refresh support
> ------------------------------------
>
> Key: TEIID-4641
> URL: https://issues.jboss.org/browse/TEIID-4641
> Project: Teiid
> Issue Type: Sub-task
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Ramesh Reddy
>
> There must be an alternative to the implied default of the table rename strategy - which is problematic when a source is not transactional or even when it is - as a multi-part swap can leave the table non-existent for a brief window or the source may have issues with ddl under an xa transaction - TEIID-4579
> This is true for the non-transactional source incremental refresh as well, which is a delete then insert - it leaves the live table briefly in an inconsistent state.
> A upsert/delete approach addresses both of these concerns at the expense of performance - especially when the source does not directly support upsert as the engine must implement a compensating procedure. However now that we have pushdown support for upsert, we'll continue to add source support.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4627) High-level event handling
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4627?page=com.atlassian.jira.plugin... ]
Work on TEIID-4627 started by Steven Hawkins.
---------------------------------------------
> High-level event handling
> -------------------------
>
> Key: TEIID-4627
> URL: https://issues.jboss.org/browse/TEIID-4627
> Project: Teiid
> Issue Type: Enhancement
> Components: Grammar, Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.2
>
>
> We should look into high-level plugability of event handling at a row level. This could even be handled at the language level with new trigger semantics for source tables: create trigger on tbl on cdc (insert|update...) - which could potentially even specify the topic mapping other details. There is complexity for multi-source models here though.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4622) Adding new data quality functions from osDQ
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4622?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4622:
---------------------------------------
Yes, follow-ups include documentation. Discussion of if we want to have these functions with a separate prefix/schema. The creation of a JIRA for encrypt/decrypt functions. And the creation of a JIRA for additional aggregate functions, such as lead/lag.
> Adding new data quality functions from osDQ
> -------------------------------------------
>
> Key: TEIID-4622
> URL: https://issues.jboss.org/browse/TEIID-4622
> Project: Teiid
> Issue Type: Feature Request
> Components: Common
> Affects Versions: Open To Community
> Environment: osdq-core and its dependency simmetric 3.0.0 is needed to run these functions
> maven central location
> http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22osdq-core%22
> Reporter: vivek singh
> Assignee: Kylin Soong
> Fix For: Open To Community
>
> Attachments: DateUtil.java, NumberUtil.java, StringUtil.java
>
>
> Following functions have been added into osdq-core for integration with teiid.
> String functions :
> // Encrypting a string using key and AES encryption
> String encrypt ( String val, String key)
> String decrypt ( String val, String key)
> // Fuzzy distance - similarity between two strings
> float levestheindistance ( String a, String b)
> float jarowinklerdistance( String a , String b)
> float cosinedistance (String a, String b)
> // Format check for PII ( personal information)
> boolean isCreditCardFormat(String a)
> boolean isSSNFormat(String a)
> boolean isPhoneFormat(String a)
> boolean isEmailFormat(String a)
> boolean hasWhiteSpace(String a )
> Date Functions
> // converting date into universal recognized format
> long dateToEpoch(java.util.Date date)
> Date epochToDate(long epoch)
> Date epochToDate(long epoch, String TimeZone)
> long diffInSec(date a, date b)
> String convertToFormat ( Date a, String Format)
> Numerical Functions
> // Statistical functions
> double stdDev(Number[] numSeries)
> double range(Number[] numSeries)
> double median(Number[] numSeries)
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4601) Infinispan DSL Translator: cannot insert into byte array column
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4601?page=com.atlassian.jira.plugin... ]
Work on TEIID-4601 started by Van Halbert.
------------------------------------------
> Infinispan DSL Translator: cannot insert into byte array column
> ---------------------------------------------------------------
>
> Key: TEIID-4601
> URL: https://issues.jboss.org/browse/TEIID-4601
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector
> Affects Versions: 8.12.7.6_3
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Fix For: 9.2
>
>
> When a POJO class field is of type byte[] , insert into a table, which is mapped to the POJO class fails with:
> {code:plain}
> Caused by: org.teiid.translator.TranslatorException: Conversion from String to byte is not supported
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:624) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:579) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:572) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.handleInsert(ObjectUpdateExecution.java:208) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:143) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) ~[?:?]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:404) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at com.sun.proxy.$Proxy82.execute(Unknown Source) ~[?:?]
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
> at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]
> Caused by: java.lang.IllegalArgumentException: Conversion from String to byte is not supported
> at org.teiid.core.util.StringUtil.valueOf(StringUtil.java:797) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.core.util.StringUtil.valueOf(StringUtil.java:768) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.translator.object.ClassRegistry.executeSetMethod(ClassRegistry.java:139) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:608) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:579) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:572) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.handleInsert(ObjectUpdateExecution.java:208) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:143) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) ~[?:?]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:404) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at com.sun.proxy.$Proxy82.execute(Unknown Source) ~[?:?]
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
> at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]
> {code}
> POJO class:
> {code:java|title=SmallA.proto}
> package org.jboss.qe.jdg.remote.protobuf;
> message SmallA {
> required int32 intKey = 1;
> optional string stringNum = 2;
> required string stringKey = 3;
> optional float floatNum = 4;
> optional string bigIntegerValue = 5;
> optional int32 shortValue = 6;
> optional double doubleNum = 7;
> optional bytes objectValue = 8;
> optional int32 intNum = 9;
> optional string bigDecimalValue = 10;
> optional int64 longNum = 11;
> optional bool booleanValue = 12;
> optional int64 timeStampValue = 13;
> optional int32 byteNum = 14;
> optional int64 timeValue = 15;
> optional int64 dateValue = 16;
> optional int32 charValue = 17;
> }
> {code}
> Java code used to insert:
> {code:java}
> PreparedStatement pSt = con.prepareStatement(
> "INSERT INTO jdgSource1.SmallA(intKey,stringNum,stringKey,floatNum,bigIntegerValue,shortValue,doubleNum,objectValue,intNum,bigDecimalValue,longNum,booleanValue,timeStampValue,byteNum,timeValue,dateValue,charValue) VALUES"
> + "(1,'1','1',1.0,1,1,1,?,1,1.00,1,true,{ts '2016-01-01 12:00:00'},1,'12:00:00','2016-01-01','1')");
> pSt.setBytes(1, "1".getBytes());
> pSt.executeUpdate();
> {code}
> The cause is that internally the object translator uses StringUtil which can't handle byte type.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4640) Mongo translator - embeddable tables - creation of collection fails
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-4640:
-----------------------------------
Summary: Mongo translator - embeddable tables - creation of collection fails
Key: TEIID-4640
URL: https://issues.jboss.org/browse/TEIID-4640
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.8.6_3
Reporter: Juraj Duráni
Assignee: Steven Hawkins
I use Teiid to create collection in MongoDB (with first INSERT).
This scenario works for simple tables. However, if I have embeddable tables \[1\], parent table creation fails \[2, 3\].
{code:sql|title=\[1\] DDL}
CREATE FOREIGN TABLE Person (
id integer PRIMARY KEY,
name varchar(25),
company_id integer,
FOREIGN KEY (company_id) REFERENCES Company (id)
) OPTIONS(UPDATABLE 'TRUE');
CREATE FOREIGN TABLE Company (
id integer PRIMARY KEY,
name varchar(25)
) OPTIONS(UPDATABLE 'TRUE', "teiid_mongo:EMBEDDABLE" 'TRUE');
{code}
{code:sql|title=\[2\] Insert queries}
INSERT INTO Company (id, name) VALUES (11, 'comp11');
INSERT INTO Person(id, name, company_id) VALUES (11, 'p11', 11);
{code}
{code:plain|title=\[3\] Exception}
09:23:19,306 WARN [org.teiid.PROCESSOR] (Worker33_QueryProcessorQueue527) TEIID30020 Processing exception for request 7MaF5Ey1GjEO.32 'TEIID30504 local: { "serverUsed" : "dvqe03.mw.lab.eng.bos.redhat.com:27017" , "spec" : { "name" : "FK0" , "ns" : "Person" , "key" : { "company_id" : 1}} , "ok" : 0.0 , "errmsg" : "namespace mismatch"}'. Originally TeiidProcessingException CommandResult.java:76.: org.teiid.core.TeiidProcessingException: TEIID30504 local: { "serverUsed" : "dvqe03.mw.lab.eng.bos.redhat.com:27017" , "spec" : { "name" : "FK0" , "ns" : "Person" , "key" : { "company_id" : 1}} , "ok" : 0.0 , "errmsg" : "namespace mismatch"}
at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
Caused by: org.teiid.translator.TranslatorException: { "serverUsed" : "dvqe03.mw.lab.eng.bos.redhat.com:27017" , "spec" : { "name" : "FK0" , "ns" : "Person" , "key" : { "company_id" : 1}} , "ok" : 0.0 , "errmsg" : "namespace mismatch"}
at org.teiid.translator.mongodb.MongoDBUpdateExecution.execute(MongoDBUpdateExecution.java:79)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:402) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source) [:1.8.0-internal]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at com.sun.proxy.$Proxy47.execute(Unknown Source)
at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0-internal]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
... 6 more
Caused by: com.mongodb.CommandFailureException: { "serverUsed" : "dvqe03.mw.lab.eng.bos.redhat.com:27017" , "spec" : { "name" : "FK0" , "ns" : "Person" , "key" : { "company_id" : 1}} , "ok" : 0.0 , "errmsg" : "namespace mismatch"}
at com.mongodb.CommandResult.getException(CommandResult.java:76)
at com.mongodb.CommandResult.throwOnError(CommandResult.java:140)
at com.mongodb.DBCollectionImpl.createIndex(DBCollectionImpl.java:399)
at com.mongodb.DBCollection.createIndex(DBCollection.java:597)
at org.teiid.translator.mongodb.MongoDBUpdateExecution.createIndex(MongoDBUpdateExecution.java:608)
at org.teiid.translator.mongodb.MongoDBUpdateExecution.getCollection(MongoDBUpdateExecution.java:578)
at org.teiid.translator.mongodb.MongoDBUpdateExecution.executeInternal(MongoDBUpdateExecution.java:85)
at org.teiid.translator.mongodb.MongoDBUpdateExecution.execute(MongoDBUpdateExecution.java:77)
... 18 more
{code}
If collection in Mongo exists, no exception is thrown and all data are properly inserted.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4639) Mongo translator - embeddable tables - NULL primary key of embedded table in result
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-4639:
-----------------------------------
Summary: Mongo translator - embeddable tables - NULL primary key of embedded table in result
Key: TEIID-4639
URL: https://issues.jboss.org/browse/TEIID-4639
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.8.6_3
Reporter: Juraj Duráni
Assignee: Steven Hawkins
Issuing query like \[1\] on embeddable tables scenario \[2\], in the result, primary key of embedded table is NULL \[3\].
{code:sql|title=\[1\] Sample query}
SELECT a.id AS a_id, a.company_id AS a_cid, b.id AS b_id FROM Person a INNER JOIN Company b IN a.company_id = b.id
{code}
{code:sql|title=\[2\] DDL}
CREATE FOREIGN TABLE Person (
id integer PRIMARY KEY,
name varchar(25),
company_id integer,
FOREIGN KEY (company_id) REFERENCES Company (id)
) OPTIONS(UPDATABLE 'TRUE');
CREATE FOREIGN TABLE Company (
id integer PRIMARY KEY,
name varchar(25)
) OPTIONS(UPDATABLE 'TRUE', "teiid_mongo:EMBEDDABLE" 'TRUE');
{code}
*\[3\] Result*
||a_id||a_cid||b_id||
|11|11|<null>|
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4638) Mongo translator - nested embeddable tables - INNER JOIN is not symetric
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-4638:
-----------------------------------
Summary: Mongo translator - nested embeddable tables - INNER JOIN is not symetric
Key: TEIID-4638
URL: https://issues.jboss.org/browse/TEIID-4638
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.8.6_3
Reporter: Juraj Duráni
Assignee: Steven Hawkins
I have three tables bound together in nested EMBEDDABLE scenario \[1\]. I have three respective collections in Mongo \[2\]. Issuing SQL query with INNER JOIN on first two tables, result depends on order of tables in JOIN (i.e. _a JOIN b_ vs. _b JOIN a_) \[3, 4\].
{code:sql|title=\[1\] DDL}
CREATE FOREIGN TABLE Issue (
id integer PRIMARY KEY,
name varchar(25),
reporter_id integer,
FOREIGN KEY (reporter_id) REFERENCES Person (id)
) OPTIONS(UPDATABLE 'TRUE');
CREATE FOREIGN TABLE Person (
id integer PRIMARY KEY,
name varchar(25),
company_id integer,
FOREIGN KEY (company_id) REFERENCES Company (id)
) OPTIONS(UPDATABLE 'TRUE', "teiid_mongo:EMBEDDABLE" 'TRUE');
CREATE FOREIGN TABLE Company (
id integer PRIMARY KEY,
name varchar(25)
) OPTIONS(UPDATABLE 'TRUE', "teiid_mongo:EMBEDDABLE" 'TRUE');
{code}
{code:plain|title=\[2\] Mongo data}
> db.Company.find()
{ "_id" : 11, "name" : "comp11" }
> db.Person.find()
{ "_id" : 11, "name" : "p11", "company_id" : 11, "Company" : { "name" : "comp11" } }
> db.Issue.find()
{ "_id" : 11, "name" : "i11", "reporter_id" : 11, "Person" : { "name" : "p11", "company_id" : 11, "Company" : { "name" : "comp11" } } }
{code}
\[3\]
*Query 1*
{code:sql}
SELECT a.*, b.* FROM Company a INNER JOIN Person b ON a.id = b.company_id
{code}
*Result*
||id||name||id||name||company_id||
\[4\]
*Query 2*
{code:sql}
SELECT a.*, b.* FROM Person b INNER JOIN Company a ON a.id = b.company_id
{code}
*Result*
||id||name||id||name||company_id||
|<null>|comp11|11|p11|11|
*Note 1*
Person <--> Issue relationship is not affected by this issue.
*Note 2*
In \[4\], first _id_ in result is _null_. I will report this as a separate issue.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4636) In the SWARM readme's, need to indicate the URL to connect
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4636?page=com.atlassian.jira.plugin... ]
Kylin Soong edited comment on TEIID-4636 at 12/11/16 9:33 PM:
--------------------------------------------------------------
Actually, this is also compatible with current teiid impl, as below config copied from teiid server, '{jboss.http.port', '{jboss.https.port', etc, can use to change the reference port, but teii-jdbc and teiid-odbc not define these kinds of properties.
{code}
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
<socket-binding name="http" port="${jboss.http.port:8080}"/>
<socket-binding name="https" port="${jboss.https.port:8443}"/>
<socket-binding name="teiid-jdbc" port="31000"/>
<socket-binding name="teiid-odbc" port="35432"/>
{code}
was (Author: kylin):
Actually, this is for compatible with current teiid impl, as below config copied from teiid server, '{jboss.http.port', '{jboss.https.port', etc, can use to change the reference port, but teii-jdbc and teiid-odbc not.
{code}
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
<socket-binding name="http" port="${jboss.http.port:8080}"/>
<socket-binding name="https" port="${jboss.https.port:8443}"/>
<socket-binding name="teiid-jdbc" port="31000"/>
<socket-binding name="teiid-odbc" port="35432"/>
{code}
> In the SWARM readme's, need to indicate the URL to connect
> ----------------------------------------------------------
>
> Key: TEIID-4636
> URL: https://issues.jboss.org/browse/TEIID-4636
> Project: Teiid
> Issue Type: Enhancement
> Components: Quick Starts
> Affects Versions: 9.2
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Minor
>
> The quickstarts needs to include the information (i.e, URL, username, password, etc.) needed to connect to the swarm example.
> Per Kylin:
> By default 0.0.0.0 be bound as IP, 31000 as port. To bind a specific IP use system properties
> ---
> -Dswarm.bind.address=127.0.0.1
> ---
> Some Fractions use a system properties to change the port number, but teiid not support it at moment.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month