Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

How to create SQL Virtual tables

(0) ShareShare
ReportReport
Posted on by 50

I'm looking to create virtual tables in Dataverse environment connected to SQL Server.  I'd appreciate understanding how to setup the SQL tables.   If I have existing data, how do I create new GUID key.  What's required for the second "primary field" in addition to the PK ?

 

Categories:
  • Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on at
    Re: How to create SQL Virtual tables

    Hi @EAguilera ,

     

    Please open another question with your issues and explain the operations that are causing issues.  This will help you get better support from the community because it will be a question that is not already answered.  I am happy to try and help you through this.  Please try to be specific in the details on the challenges.

  • Eliel Aguilera Profile Picture
    51 on at
    Re: How to create SQL Virtual tables

    Hi @dpoggemann, I'm sorry to re-use this post, but I'm actually locked into a situation with the Virtual Connectors for Dataverse. I followed the tutorial you mentioned before and I got the tables and the data into Dataverse, but every time I want to do an operation over the table I got a "BadRequest : The specified item '< id >' is not found". To give a little of context, I tried in two different enviroments, servers, databases and several tables with no luck. Maybe I miss something? Thanks in advance for help!.

  • Verified answer
    Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on at
    Re: How to create SQL Virtual tables

    Hi @RobertLHU ,

     

    Yes you can.   Just did it and it worked great!  

  • RobertLHU Profile Picture
    50 on at
    Re: How to create SQL Virtual tables

    Hello again @dpoggemann ,

    One more question on potential use cases for these virtual tables.  Can you use a virtual table as a target for a dataflow ?  

  • RobertLHU Profile Picture
    50 on at
    Re: How to create SQL Virtual tables

    Drew,

    Thanks for your time and sharing your experience. 👍

  • Verified answer
    Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on at
    Re: How to create SQL Virtual tables

    Hi @RobertLHU ,

    One of the key use cases is:

    Provide ability to extend tables in a separate system that you are not able to edit but provide critical information.  Example is one system I would looking for with a customer that needed to provide "Good Faith Estimates" in Healthcare but their EMR system did not have this functionality.  We wanted to connect the details from the Dataverse tables to patients in the EMR without copying them into the Dataverse through Data Flows, Azure Data Factory, other middleware etc.

     

    You can utilize this to create those relationships in your Dataverse application to the new tables and even create simple "CRUD" methods to maintain the SQL data as well.

  • RobertLHU Profile Picture
    50 on at
    Re: How to create SQL Virtual tables

    Thank you for confirming those details.  One last question please before finishing this thread 😊  🤔  Editing SQL in Excel was a valuable potential use case that I now realize is out of scope... What incremental value do you see in creating a virtual table for SQL Server instead of just using the SQL connector straight away ? ? I don't currently see the justification for the extra work.

     

  • Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on at
    Re: How to create SQL Virtual tables

    Hi @RobertLHU ,

     

    1. You do not need the GUID primary key anymore as stated in the article
    2. Please see limitations of the SQL COnnector as this is what is used behind the scenes (https://docs.microsoft.com/en-us/connectors/sql/) and if you look at the actions it only supports a single row update (https://docs.microsoft.com/en-us/connectors/sql/#actions) vs. multiple.
  • RobertLHU Profile Picture
    50 on at
    Re: How to create SQL Virtual tables

    thank you for your response.  I've been reading through that article, but there seems to be some missing pieces.  

    * does my SQL table require a GUID PK?  

    I've successfully created a virtual table from that article, but I get an error when I try to edit in Excel like other dataverse tables.  

    A row created in data set cr_dbo_tvcalendarvs was not published. Error message: 'Write operation for Virtual Entity is not allowed in Batch request. '

     

    Is Excel a dead-end for editing a virtual table, or am I perhaps configuring the data wrong?

    I created two virtual tables, one with GUID and one without GUID, and I get the same error.

    any thoughts you have are appreciated.

     

  • Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on at
    Re: How to create SQL Virtual tables

    Hi @RobertLHU ,

     

    I just did a presentation late last week on this exact topic at a User Group utilizing the Virtual Connectors in preview which makes it very easy to create virtual tables connected to SQL Server.

     

    Please see the following article which walks through step by step:

    https://docs.microsoft.com/en-us/power-apps/developer/data-platform/virtual-entities/create-virtual-tables-using-connectors?tabs=sql 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics