[JBoss JIRA] (TEIID-5072) Generated keys should be passed from triggers
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5072?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5072:
---------------------------------------
The proposal for this would look like:
{code}
create view v1 (i integer, k integer not null auto_increment primary key) OPTIONS (UPDATABLE true)
as select x, y from tbl;
create trigger on v1 instead of insert as
for each row begin atomic
insert into tbl (x) values (new.i); key.k = cast(generated_key('y') as integer);
end;
{code}
This introduces a new variable group key, which would only be in scope for the insert trigger on a view with an auto_increment primary key - and only for the key columns. There would be a new function introduced called generated_key(string) that could fetch the first generated key column value from the last insert statement or null if there were no matching columns, etc.
> Generated keys should be passed from triggers
> ---------------------------------------------
>
> Key: TEIID-5072
> URL: https://issues.jboss.org/browse/TEIID-5072
> Project: Teiid
> Issue Type: Sub-task
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.0
>
>
> In the context of an update trigger we should be able to convey the generated keys to the caller. In the case where only a single insert occurs, this should be automatic. Otherwise we'll need functions/variables to get/set the generated keys in the procedure. For example see the LAST_INSERT_ID function on mysql.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months
[JBoss JIRA] (TEIID-5072) Generated keys should be passed from triggers
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5072?page=com.atlassian.jira.plugin... ]
Work on TEIID-5072 started by Steven Hawkins.
---------------------------------------------
> Generated keys should be passed from triggers
> ---------------------------------------------
>
> Key: TEIID-5072
> URL: https://issues.jboss.org/browse/TEIID-5072
> Project: Teiid
> Issue Type: Sub-task
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.0
>
>
> In the context of an update trigger we should be able to convey the generated keys to the caller. In the case where only a single insert occurs, this should be automatic. Otherwise we'll need functions/variables to get/set the generated keys in the procedure. For example see the LAST_INSERT_ID function on mysql.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months
[JBoss JIRA] (TEIID-5072) Generated keys should be passed from triggers
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5072?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5072:
-------------------------------------
`GenerationType.IDENTITY` is pretty commonly used PK generation strategy, so having this would be very useful. For spring-boot work, yes this needed, but not sure how much work involved.
> Generated keys should be passed from triggers
> ---------------------------------------------
>
> Key: TEIID-5072
> URL: https://issues.jboss.org/browse/TEIID-5072
> Project: Teiid
> Issue Type: Sub-task
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.0
>
>
> In the context of an update trigger we should be able to convey the generated keys to the caller. In the case where only a single insert occurs, this should be automatic. Otherwise we'll need functions/variables to get/set the generated keys in the procedure. For example see the LAST_INSERT_ID function on mysql.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months
[JBoss JIRA] (TEIID-5073) Building Salesforce adapter/translator pair issues
by Thomas Esche (JIRA)
Thomas Esche created TEIID-5073:
-----------------------------------
Summary: Building Salesforce adapter/translator pair issues
Key: TEIID-5073
URL: https://issues.jboss.org/browse/TEIID-5073
Project: Teiid
Issue Type: Patch
Components: Salesforce Connector
Affects Versions: 9.2.3
Environment: wildfly 10.0.0.Final and teiid-9.2.3
Reporter: Thomas Esche
Assignee: Steven Hawkins
Fix For: 9.3.3
I tried to follow the instructions on https://github.com/teiid/salesforce to build a newer adapter/translator pair but I was not even able to build the provided v34 pair.
The "mvn clean install" produce the following error:
[INFO] ------------------------------------------------------------------------
[INFO] Building Salesforce Resource Adapter API 34 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repository.jboss.org/nexus/content/repositories/thirdparty-upload...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Salesforce API 34 .................................. SUCCESS [ 1.091 s]
[INFO] Salesforce Translator 34 ........................... SUCCESS [ 2.105 s]
[INFO] Salesforce Resource Adapter API 34 ................. FAILURE [ 1.596 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.490 s
[INFO] Finished at: 2017-09-20T11:13:59+02:00
[INFO] Final Memory: 35M/425M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project connector-salesforce-34: Could not resolve dependencies for project org.jboss.teiid.connectors.salesforce-34:connector-salesforce-34:jar:1.0-SNAPSHOT: Could not find artifact org.jboss.teiid.connectors:connector-salesforce:rar:9.0.0.Final in thirdparty-uploads (https://repository.jboss.org/nexus/content/repositories/thirdparty-uploads/) -> [Help 1]
After removing the dependencies block in the ...\connector-salesforce-34\pom.xml maven works, but it seems to create an invalid adapter.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months
[JBoss JIRA] (TEIID-5072) Generated keys should be passed from triggers
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5072?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5072:
---------------------------------------
[~rareddy] Let me know if this needs to be bumped in priority.
> Generated keys should be passed from triggers
> ---------------------------------------------
>
> Key: TEIID-5072
> URL: https://issues.jboss.org/browse/TEIID-5072
> Project: Teiid
> Issue Type: Sub-task
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.0
>
>
> In the context of an update trigger we should be able to convey the generated keys to the caller. In the case where only a single insert occurs, this should be automatic. Otherwise we'll need functions/variables to get/set the generated keys in the procedure. For example see the LAST_INSERT_ID function on mysql.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months
[JBoss JIRA] (TEIID-5071) Teiid designer Odata4 model import fails to load metadata and throws java.lang.NullPointerException
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5071?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5071:
---------------------------------------
I can't reproduce the same exception on master or 8.12.12, but it is a related exception as the metadata is not properly read.
[~rareddy] Should olingo check or expose the MaxDataServiceVersion property so that we can produce a better error message when the odata4 translator is pointed toward an odata 2 source? Alternatively is it your expectation that this scenario should work?
> Teiid designer Odata4 model import fails to load metadata and throws java.lang.NullPointerException
> ---------------------------------------------------------------------------------------------------
>
> Key: TEIID-5071
> URL: https://issues.jboss.org/browse/TEIID-5071
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.12.12.6_3
> Reporter: Colin Mondesir
> Assignee: Steven Hawkins
>
> The odata4 translator throws a NPE when the designer attempts to import model.
> 08:55:36,424 WARN [org.teiid.RUNTIME] (teiid-async-threads - 3) TEIID50036 VDB importVDB1.1 model "importVDB1SrcModel" metadata failed to load. Reason:java.lang.NullPointerException: java.lang.NullPointerException
> at org.teiid.translator.odata4.ODataMetadataProcessor.addPrimaryKey(ODataMetadataProcessor.java:331)
> at org.teiid.translator.odata4.ODataMetadataProcessor.addEntityTypeProperties(ODataMetadataProcessor.java:243)
> at org.teiid.translator.odata4.ODataMetadataProcessor.addTable(ODataMetadataProcessor.java:219)
> at org.teiid.translator.odata4.ODataMetadataProcessor.getMetadata(ODataMetadataProcessor.java:122)
> at org.teiid.translator.odata4.ODataMetadataProcessor.process(ODataMetadataProcessor.java:105)
> at org.teiid.translator.odata4.ODataExecutionFactory.getMetadata(ODataExecutionFactory.java:119)
> at org.teiid.translator.odata4.ODataExecutionFactory.getMetadata(ODataExecutionFactory.java:69)
> at org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:96) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
> at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:62) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
> at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
> at org.teiid.jboss.VDBService$6.run(VDBService.java:395) [teiid-jboss-integration-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
> at org.teiid.jboss.VDBService$7.run(VDBService.java:446) [teiid-jboss-integration-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
> at org.jboss.threads.JBossThread.run(JBossThread.java:122)
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months
[JBoss JIRA] (TEIID-5072) Generated keys should be passed from triggers
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-5072:
-------------------------------------
Summary: Generated keys should be passed from triggers
Key: TEIID-5072
URL: https://issues.jboss.org/browse/TEIID-5072
Project: Teiid
Issue Type: Sub-task
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 10.0
In the context of an update trigger we should be able to convey the generated keys to the caller. In the case where only a single insert occurs, this should be automatic. Otherwise we'll need functions/variables to get/set the generated keys in the procedure. For example see the LAST_INSERT_ID function on mysql.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 6 months