cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lionofnowhere
Regular Visitor

Sync SQL table into CDS

Hi:

 

I was playing with powerapps by creating a simple inventory lookup to a SQL table accessed via the gateway service. The query was always slow, despite a 100Mb connection onsite, so I tested the same app using the CDS and it was much faster.

 

So, I want to sync the SQL table with a CDS entity a few times a day to keep it updated. I tried to use a flow process that read all rows from the SQL table and added rows to the CDS service - but it always stops at 500 rows (it appears the powerapps 500 row limit is the same in Flow.)

 

Has anyone got a way around this? Or maybe there's another way to do it.

5 REPLIES 5
abm
Super User III
Super User III

Hi @lionofnowhere,

 

I think you are right. There is a limitation here. I need to do more testing around here and let you know.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
abm
Super User III
Super User III

Hi @lionofnowhere,

 

Created 1000 records in a SQL table and try to create the records in CDS. 512 records are created. So the options are try to use the recurrence flow to trigger and configure to run every few minutes or hours. Once the record is created in CDS update the SQL record (SQL Field - 'Updated' Type - boolean) to true. Filter the SQL records using ODATA against Updated boolean flag. I haven't tested the ODATA filter in SQL yet. If you want me to test let me know.

 

Thanks 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

@abm Thanks, that's a good idea, I'll give it a try.

 

 

Hi @lionofnowhere,

 

Let me know the outcome about ODATA. Thanks for your reply.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

I'm trying to think of a way to avoid querying the gateway every few minutes.

 

I thought I could have a counter in CDS that was incremented for each instance of the flow that started (it would need ot be reset to 0 before a full sync). The counter would be used to retrieve the right set of 500 records, using the offset parameter, for the instance of flow running; when no more records were available I could set a flag in CDS that could be read by new isntances of the flow to tell the flow to terminate because all records were already synced (both the flag and counter would be reset once a day to start the sync.)

 

However, there does not seem to be a way to increment a field in CDS. I tried reading a field and incrementing it, but flow attempts to convert the code to an integer.

 

I think I'm hitting the limits of flow here. What appears quite a simple task is becoming very complicated.

 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Users online (2,387)