2 Replies Latest reply on May 6, 2019 1:16 PM by Steven Hawkins

    Multi-Inserts & Transactions via Batch Request

    dmtine Newbie



      I have two questions about OData in connection with the Teiid / WildFly 11.


      1) In my case the Teiid is connected to a database of a MariaDB Server 10.2 or alternatively to a MS SQL Server 2017.

      Via OData I want to insert several records with one request into a table x.

      For this I have found the procedure "Batch Request" in the documentation.

      However, I am not completely satisfied with the performance when it comes to a large number of data records. For comparison: Using SQL I can also insert several records with a single insert statement.

      Is there a comparable possibility under OData/Teiid to upload several records with a single post-request?


      2) How can I perform transactions with OData/Teiid?

      I have tried the following: In a BatchRequest, I tried to insert multiple records within a changeset with multiple post-requests. This worked perfectly. However, to test the transaction, I have included a syntax error in the last post-request. I expected no record to be created in the database due to the error. However, I noticed that all previous records were created. What did I do wrong or how can I ensure a real transaction within a changeset?


      Many greetings