A Deep Dive into Virtual Tables in Dataverse for Developers
Virtual Tables in Dataverse allow developers to connect and display data from external systems—like SQL, SharePoint, or REST APIs—directly within Dataverse without storing it locally. They act as a bridge that makes external data appear as native Dataverse tables, enabling users to view and interact with that data in real time through model-driven apps, Power Apps, and Power Automate. This eliminates the need for data duplication or synchronization while maintaining a consistent Dataverse experience. Virtual Tables use a data provider to translate Dataverse queries into the external system’s language, making them ideal for real-time integrations where up-to-date external information needs to be accessed seamlessly within the Power Platform ecosystem.
- Connects to the external data source.
- Executes the translated query.
- Returns results as Dataverse records — dynamically.
- Implement a custom plugin that inherits from IDataProviderPlugin and handles:
- Retrieve
- RetrieveMultiple
- (Optionally) Create, Update, Delete
- Register your plugin using the Plugin Registration Tool.
- Create a Data Source entity that uses your provider.
- Define your Virtual Table and map its columns.
public class MyApiVirtualTableProvider : IDataProviderPlugin{public void Retrieve(IPluginExecutionContext context){// Translate Dataverse query to API request// Deserialize response and return entity collection}public void RetrieveMultiple(IPluginExecutionContext context){// Handle FetchXML or OData queries}}
- SQL Server
- SharePoint
- Cosmos DB
- Azure Table Storage
- OData v4
- Microsoft Graph
- API performance of the external system
- Network latency
- Query complexity
- Retrieve only necessary columns.
- Apply filters early in your source queries.
- Use caching if external source supports it.
- Use column-level mapping carefully to minimize payload size.
- Access is controlled through Dataverse privileges (Read, Create, etc.).
- However, authentication to the external system is handled by the Data Source configuration (connection credentials or service principal).
- Row-level security depends on the external data source — Dataverse does not enforce it.
- Always define a unique primary key field in the external data source.
- Test with small datasets first to validate latency.
- For custom providers, handle paging and filter translation properly.
- Use diagnostic tracing to troubleshoot performance.
- If security is critical, integrate Azure API Management as a secure layer.
- Create an Azure SQL table named Inventory.
- Create a new SQL Data Source in Dataverse.
- Define a Virtual Table named Inventory Items.
- Map columns to SQL table fields.
- Query the table from Power Apps or using Xrm.WebApi.retrieveMultipleRecords.
Virtual Tables = “Real-time integration without replication.”They bridge the gap between Dataverse and external systems while preserving the Dataverse experience for users, forms, views, and model-driven apps.


Comments
Post a Comment