简体   繁体   English

逻辑应用程序 - SQL 连接器返回缓存数据?

[英]Logic Apps - SQL Connector returning cached data?

I have a Logic App that uses the "SQL Server - When an item is modified (V2)" trigger, monitoring an Azure SQL DB for updated rows.我有一个逻辑应用程序,它使用“SQL Server - 修改项目时 (V2)”触发器,监视 Azure SQL DB 以获取更新的行。 When running this LA, I noticed that the modified row that came as output for this trigger did NOT contain the updated data.运行此 LA 时,我注意到此触发器的 output 的修改行不包含更新的数据。

I thought this might be by design (don't really see why, but ok...) so I added a "Get Row" action directly after the trigger, to go fetch the most recent data for the row that triggered the LA.我认为这可能是设计使然(真的不明白为什么,但是好的......)所以我在触发器之后直接添加了一个“获取行”操作,go 获取触发 LA 的行的最新数据。 But even this step still returned the old, not-updated data for that row.但即使这一步仍然返回该行的旧的、未更新的数据。

However, when I resubmit the run some seconds later, the "Get Row" action does get the updated data from the database.但是,当我几秒钟后重新提交运行时,“获取行”操作确实从数据库中获取了更新的数据。

Is this normal behavior?这是正常行为吗? Is the SQL DB row version already updated even though the data update isn't committed yet, triggering the Logic App but not returning the updated data yet?即使尚未提交数据更新,SQL DB 行版本是否已更新,触发逻辑应用但尚未返回更新的数据?

Thanks for pointing me to add a timestamp to my table, I add the timestamp and then I can find the table in the selection.感谢您指点我为我的表添加时间戳,我添加了时间戳,然后我可以在选择中找到该表。 I test it in my side but the trigger works fine, it output the updated data.我在我身边测试它,但触发器工作正常,它 output 更新数据。 I provide my logic below for your reference:我在下面提供我的逻辑供您参考:

My table show as:我的表显示为:

在此处输入图像描述

My logic app:我的逻辑应用程序:

在此处输入图像描述

Please note I disable the " Split On " in " Settings " of the trigger.请注意,我在触发器的“设置”中禁用了“拆分开”。

在此处输入图像描述 在此处输入图像描述

After running the update sql:运行更新 sql 后:

update Table3 set name = 'hury1' where id  = 1;
update Table3 set name = 'jim1' where id  = 2;

I got the result (the variable updateItems in screenshot contains both updated items):我得到了结果(屏幕截图中的变量updateItems包含两个更新的项目):

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Azure 逻辑应用 ARM 模板中,使用本地数据网关的 SQL Server 连接器的 AuthType 属性的可能值是什么? - In Azure Logic Apps ARM template, what are the possible values for the AuthType property for a SQL Server connector using On-Premise Data Gateway? 使用没有数据网关的Azure Logic应用连接到本地SQL数据库吗? - Connect to on-premise SQL database with Azure Logic apps without data gateway? 使用Logic Apps将数据从XML文件加载到Azure中的SQL数据库 - Load data from XML file to SQL database in Azure using Logic Apps Azure Logic App - Twitter和MS SQL Connector问题 - Azure Logic App - Twitter and MS SQL Connector issues 如何在逻辑应用程序中创建动态 SQL 服务器 API 连接器 - How to create Dynamic SQL server API connector in Logic app SQL XML不返回数据 - SQL XML not returning data SQL Server业务逻辑:删除引用的数据 - SQL Server Business Logic: Deleting Referenced Data 用于从表中获取数据的SQL Server逻辑 - SQL server logic for fetching data from the table 如何通过 sql 中的日期时间逻辑获取数据 - How to get data by datetime logic in sql 在CKFinder连接器中查找存储在SQL Server二进制数据中的图像 - Looking for a CKFinder connector for images stored in SQL Server binary data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM