We need to import bulk data (tasks) from an external source (Excel file from another system) into Dataverse.
Scenario
We need to import bulk data (tasks) from an external source (Excel file from another system) into Dataverse.
πΉ Architecture Flow (Step by Step)
-
Excel File Source
-
External system exports tasks into an Excel file.
-
File includes: title, description, category, duration, status.
-
File uploaded to Azure Blob Storage.
-
-
Staging Database (SQL Server)
-
Before directly pushing into Dataverse, the file data is copied into a staging table in SQL Server.
-
Benefits:
-
Data validation before import.
-
Status tracking (
import_statuscolumn: e.g., Pending, Success, Failed). -
Easier error handling/re-runs.
-
-
-
Azure Data Factory (ADF) Pipeline
-
Orchestrates the entire process.
-
Activity 1 (Copy Activity): Reads Excel from Blob → Loads into SQL staging table.
-
Activity 2 (Web Activity): Calls a Logic App to start processing staged rows.
-
-
Logic App (Transformation + Import into Dataverse)
-
Triggered via HTTP by ADF.
-
Iterates through SQL staging rows.
-
For each row:
-
Calls Dataverse Connector → Creates a Task in Dataverse.
-
Updates the SQL row’s
import_statusto Success or Failed depending on outcome.
-
-
Uses Run After settings to handle retries and exceptions (so failed records can be marked and reprocessed later).
-
-
Monitoring & Error Handling
-
Pipeline execution monitored in ADF.
-
Each row’s result tracked in SQL staging (
import_status). -
If Dataverse throttling or temporary error occurs, Logic App can retry only failed rows.
-
-
Result
-
Tasks created in Dataverse.
-
Visible inside Model-driven Apps.
-
πΉ Key Benefits of This Approach
-
✅ API Throttling Protection → Staging + batch import reduces hitting Dataverse limits.
-
✅ Error Handling → Failed rows tracked in SQL; can be retried without re-importing everything.
-
✅ Scalability → ADF pipeline manages orchestration, scaling to millions of rows.
-
✅ Separation of Concerns → ADF handles orchestration, SQL handles staging & logging, Logic App handles Dataverse integration.
-
✅ Flexibility → Instead of importing all data into Dataverse, you can also expose external data via Virtual Tables or custom UI controls, avoiding data duplication.
πΉ Alternative Consideration
At the end, they mention:
π Instead of importing everything, sometimes it’s better to expose data in real-time from external systems into Dataverse UI (via Virtual Tables, custom controls, or Power Pages).
This avoids:
-
Large storage consumption in Dataverse.
-
API throttling issues.
-
Data duplication.
Comments
Post a Comment