[Canvas Apps] Add skill to migrate apps with SP list data sources to Dataverse Tables#103
[Canvas Apps] Add skill to migrate apps with SP list data sources to Dataverse Tables#103rsantos00 wants to merge 3 commits intomicrosoft:mainfrom
Conversation
Add a new skill to migrate Apps with Sharepoint list datasources to Dataverse tables.
|
@microsoft-github-policy-service agree |
|
@microsoft-github-policy-service agree company="Microsoft" |
There was a problem hiding this comment.
Pull request overview
Adds a new Canvas Apps skill intended to guide migration of Canvas App .pa.yaml formulas from SharePoint (and other non-Dataverse sources) to Dataverse tables, using the Canvas Authoring MCP workflow.
Changes:
- Introduces a new
migrate-to-dataverseskill with a prescribed discovery → mapping → replacement → compile/validate workflow. - Adds user-facing guidance for building a column mapping plan and requesting approval before applying edits.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| version: 1.0.0 | ||
| description: Read the YAML files of an existing Canvas App and replace Power FX data source calls with equivalent Dataverse table calls. USE WHEN the user wants to migrate, replace, or update data source references in pa.yaml files to point to Dataverse tables. | ||
| author: Rui Santos | ||
| user-invocable: true |
There was a problem hiding this comment.
The skill frontmatter is missing an allowed-tools entry. In this plugin, other skills declare allowed-tools to permit required MCP tools and file operations; without it, this skill may be unable to call sync_canvas, list_data_sources, get_data_source_schema, compile_canvas, or edit files at runtime.
| user-invocable: true | |
| user-invocable: true | |
| allowed-tools: | |
| - sync_canvas | |
| - list_data_sources | |
| - get_data_source_schema | |
| - compile_canvas | |
| - read_file | |
| - edit_file |
| ## CRITICAL: Sync the Canvas App First | ||
|
|
||
| Before reading or editing any YAML files, call the `sync_canvas` MCP tool to ensure a local copy of the canvas app YAML is present and up to date. This pulls the current app state from the coauthoring session into local `.pa.yaml` files. | ||
|
|
||
| Only proceed after `sync_canvas` completes successfully. |
There was a problem hiding this comment.
This workflow instructs calling sync_canvas/compile_canvas but never establishes a working directory or specifies the target directory argument. Other canvas-app skills create a dedicated folder and pass that absolute path to these tools to avoid syncing/editing into the repo root and to ensure compilation runs against the right files.
| description: Read the YAML files of an existing Canvas App and replace Power FX data source calls with equivalent Dataverse table calls. USE WHEN the user wants to migrate, replace, or update data source references in pa.yaml files to point to Dataverse tables. | ||
| author: Rui Santos | ||
| user-invocable: true | ||
| --- | ||
|
|
||
| # Migrate Canvas App Data Sources to Dataverse | ||
|
|
||
| Read the YAML files of the current Canvas App and replace all Power FX data source calls with Dataverse equivalents for the following requirements: |
There was a problem hiding this comment.
The document uses both "Power FX" and "Power Fx"; elsewhere in this plugin (and in TechnicalGuide.md) the casing is consistently "Power Fx". Standardizing the term will keep guidance consistent and avoid search/replace misses in downstream tooling.
| description: Read the YAML files of an existing Canvas App and replace Power FX data source calls with equivalent Dataverse table calls. USE WHEN the user wants to migrate, replace, or update data source references in pa.yaml files to point to Dataverse tables. | |
| author: Rui Santos | |
| user-invocable: true | |
| --- | |
| # Migrate Canvas App Data Sources to Dataverse | |
| Read the YAML files of the current Canvas App and replace all Power FX data source calls with Dataverse equivalents for the following requirements: | |
| description: Read the YAML files of an existing Canvas App and replace Power Fx data source calls with equivalent Dataverse table calls. USE WHEN the user wants to migrate, replace, or update data source references in pa.yaml files to point to Dataverse tables. | |
| author: Rui Santos | |
| user-invocable: true | |
| --- | |
| # Migrate Canvas App Data Sources to Dataverse | |
| Read the YAML files of the current Canvas App and replace all Power Fx data source calls with Dataverse equivalents for the following requirements: |
Update metadata Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,111 @@ | |||
| --- | |||
| name: migrate-to-dataverse | |||
There was a problem hiding this comment.
Does this skill need to specifically be migrating to dataverse, or could it be genericized to any table-replacement operations?
There was a problem hiding this comment.
I think the Power Fx syntax might be tricky if we have think of SQL Views/Tables and the 95% of migration cases are SP-> Dataverse. Based on customers we should start with this one and if we get customer asking for SQL or any datasources, we can enhance with more targeted skills.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Identify every Power Fx formula that references a non-Dataverse data source (e.g. `Filter('MyList', …)`, `Patch('MyList', …)`, `LookUp('MyList', …)`, `Collect`, `ClearCollect`, etc.). | ||
| - Note the source table/list name, the columns referenced, and the operation type (`Filter`, `Patch`, `LookUp`, `Collect`, etc.). |
There was a problem hiding this comment.
The PR is described as migrating SharePoint list data sources to Dataverse, but Step 2 targets any “non-Dataverse” data source. That can unintentionally include connectors where a Dataverse mapping isn’t valid or desired (SQL, Excel, etc.). Tighten the instructions to explicitly scope detection/replacement to SharePoint list data sources (or clearly enumerate which connector types are supported).
| > |------|------|-------------| | ||
| > | [Table Name] | Dataverse / SharePoint / … | [column names] | | ||
|
|
||
| For each Dataverse table identified, call `get_data_source_schema` to retrieve the full column list and Power Fx types. This information is required to map source columns to destination columns accurately. |
There was a problem hiding this comment.
Step 1 says to call get_data_source_schema for each Dataverse table returned by list_data_sources. In environments with many Dataverse tables this is unnecessarily expensive and can slow the workflow. Instead, first scan the synced .pa.yaml files to identify which source lists are actually referenced, then fetch schemas only for (a) those sources and (b) the specific target tables being mapped/approved.
Add a new skill to migrate Apps with Sharepoint list datasources to Dataverse tables.