[英]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.