Logic Apps SQL trigger underlying mechanism to fire event on change
When an 'item is created' trigger for SQL in Logic App is used, how does the SQL connector query the change?
The SQL connector uses a polling mechanism to query a table for changes using a TIMESTAMP / ROWVERSION column. This data type is specifically designed for this kind of processing in SQL. The polling query essentially selects all rows where the rowversion is greater than the last polled value. The behavior is reliable since the column is controlled by SQL Server and the performance is extremely fast in the case where there is no new data. When there is new data, the performance is comparable to a simple row query.
More information on the rowversion data type here.
Because we rely on this datatype and the behavior of the SQL Server implementation of rowversion, we do not allow setting OnUpdate triggers for tables that do not have a column of this data type.
[Text from a colleague working on the SQL connector, shared here with authorization for use by other customers and Cloud Solution Architects for their design of services and applications using Logic App with the SQL connector.]
Comments
- Anonymous
February 06, 2019
Hi David, does this relate to on-prem SQL too (via the data gateway)? I am struggling with an implementation where I am trying to trigger a logic app on an Microsoft Dynamics NAV table, all of which include a timestamp column. From my logic apps I can read to and write from the table, but I am unable to get the "item is created" trigger to fire. I won't repeat all the details here, but if you and/or your colleague would be able to review my post here, I'd be very appreciative. (https://social.msdn.microsoft.com/Forums/en-US/3e628e47-6302-4ae9-8d91-d04ee8774a0b/sql-quotwhen-an-item-is-createdquot-trigger-not-triggering?forum=azurelogicapps)CheersCraig - Anonymous
June 20, 2019
This blog has been moved off the MSDN platform. Find further content and update at https://www.linkedin.com/today/author/daviburgComments are locked as part of the blog migration, so please reach out to your customer support contact for assistance with Microsoft products and services.