[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69AQX9TXX472D6Q59RYSMXY":3,"skill-same:01M69AQX9TXX472D6Q59RYSMXY":97},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":17,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M69AQX9TXX472D6Q59RYSMXY","dv-query","Dataverse 数据查询分析","Bulk reads, multi-page iteration, and analytics over Dataverse data. Use when the user wants to read, list, filter, aggregate, group, join, or analyze records — including pandas DataFrame workflows and notebook exploration. Also covers ERP (Finance and Operations \u002F F&O) business-data reads and runtime entity, schema, or action discovery; load dv-overview first, then this skill.","对 Dataverse 数据进行批量读取、多页迭代和分析。当用户想要读取、列出、筛选、聚合、分组、联接或分析记录时使用——包括 pandas DataFrame 工作流和 notebook 探索。还涵盖 ERP（Finance and Operations \u002F F&O）业务数据读取，以及运行时实体、架构或操作发现；请先加载 dv-overview，再加载本技能。","microsoft\u002FDataverse-skills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69AQ9SHMSQ8KC4EKV8DZW2Y",258,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fdataverse\u002Fskills\u002Fdv-query\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4CMBM6B4PWSM1NXGT9","数据分析与报告","SCENARIO","使用场景",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQGD5CX980XNXCJKQF70BY","数据分析师","PROFESSION","适用职业",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"dv query","query","user","bulk","records","filter","join","iteration","exploration","notebook","use","workflows","list","read","analyze","discovery","pandas","dataframe","analytics","dataverse","2026-11-10 10:12:30",false,"---\nname: dv-query\ndescription: Bulk reads, multi-page iteration, and analytics over Dataverse data. Use when the user wants to read, list, filter, aggregate, group, join, or analyze records — including pandas DataFrame workflows and notebook exploration. Also covers ERP (Finance and Operations \u002F F&O) business-data reads and runtime entity, schema, or action discovery; load dv-overview first, then this skill.\n---\n\n# Skill: Query — Read and Analyze Dataverse Records\n\n> **This skill uses Python and the Dataverse CLI.** Do not use Node.js, JavaScript, or any other language for Dataverse scripting. See the overview skill's Hard Rules.\n\n## Reads: prefer a managed surface, choose by shape\n\n**Fast path for simple reads:** If `dataverse auth who` shows an active profile, skip workspace setup and query directly with the CLI examples below. No `.env`, `auth.py`, pip install, or PAC needed for data reads.\n\nPick **MCP, the Dataverse CLI, or the SDK by the shape of the read** — all three handle auth and retry (see the routing table below and the overview's **Tool Capabilities** \u002F Hard Rule 2). MCP fits small, interactive reads; the CLI fits headless one-liners (OData, SQL, count); the SDK fits bulk iteration and analytics. For `$apply` aggregation and N:N `$expand`, prefer `client.query.fetchxml()` (aggregates + link-entity) or the managed `dataverse api` escape hatch; reach for hand-rolled `urllib`\u002F`get_token()` **only** to stay in-process inside a tight Python loop (e.g. paging thousands of rows with client-side processing — see web-api-advanced.md).\n\n### Dataverse CLI gotchas (custom tables + Windows)\n\nWhen you drive the `dataverse` CLI directly (headless reads\u002FCRUD; note the CLI needs .NET + a keyring, so it is blocked on ChatGPT web \u002F Codex cloud — use the SDK there), two empirical traps:\n\n- **Custom-table SQL pluralization.** `dataverse data query` in SQL mode auto-pluralizes the table name, and irregular plurals resolve wrong: `FROM im_category` looks up entity set `im_categorys` and returns a **404** that reads like \"table missing.\" It is not — switch to OData mode with the explicit entity set: `dataverse data query --table im_categories --select im_name`. Discover the real `EntitySetName` from `EntityDefinitions` when unsure; never conclude the table doesn't exist from this 404.\n- **Windows shell quoting.** Wrap the whole `--path` value in double quotes so `cmd.exe`\u002FPowerShell don't treat `&` as a command separator. Keep `&` **literal** — it separates OData query options; encoding it to `%26` merges them and breaks the query. Encode only `$`->`%24` (in PowerShell a bare `$select` is read as a variable). If an unquoted `&` splits the command, the wrapper can exit nonzero *even when the API returned valid JSON* — quoting prevents it. (This is why the `dataverse api request` examples in other skills quote the path, use `%24`, and leave `&` literal.)\n\n### Dataverse CLI query examples (copy-paste ready)\n\nAll `dataverse` commands take `--context` for skill attribution (global flag).\n\n```bash\n# OData filtered read (--table takes the EntitySet name, e.g. accounts not account)\ndataverse data query --table accounts --select \"name,accountid\" --filter \"name eq 'john'\" --top 10 --json --context \"app=dataverse-skills\u002F\u003Cver>;skill=dv-query;agent=\u003Cagent>\"\n\n# Count records\ndataverse data count --table accounts --context \"app=dataverse-skills\u002F\u003Cver>;skill=dv-query;agent=\u003Cagent>\"\n\n# SQL mode (uses the logical name, e.g. account not accounts)\ndataverse data query --sql \"SELECT name, accountid FROM account WHERE name LIKE '%john%'\" --json --context \"app=dataverse-skills\u002F\u003Cver>;skill=dv-query;agent=\u003Cagent>\"\n\n# Get single record by ID\ndataverse data get --table accounts --id \u003Cguid> --json --context \"app=dataverse-skills\u002F\u003Cver>;skill=dv-query;agent=\u003Cagent>\"\n\n# Raw API escape hatch\ndataverse api request --target dataverse --path \"\u002Fapi\u002Fdata\u002Fv9.2\u002Faccounts?%24select=name&%24top=5\" --context \"app=dataverse-skills\u002F\u003Cver>;skill=dv-query;agent=\u003Cagent>\"\n```\n\n**ERP target is a separate path.** ERP (Finance and Operations), when linked to a Dataverse env, does not go through the Python SDK. See [`references\u002Ferp-reads.md`](references\u002Ferp-reads.md).\n\n## How to Answer Data Questions\n\nWhen the user asks a question about their data, pick the approach by **what they're asking**, not by which API you know:\n\n| User asks... | Approach | Why |\n|---|---|---|\n| \"show me open tickets\" \u002F simple filter | **MCP** `read_query`, **CLI** `dataverse data query --table ... --filter ...`, or `client.records.list(table, filter=...)` | Small result, no aggregation |\n| \"how many X\" \u002F simple count | **CLI** `dataverse data count --table ...`, **MCP** `read_query`, or `client.query.sql(\"SELECT COUNT(*) ...\")` | Server-side count (no row download) |\n| Single-table aggregation (most\u002Fsum\u002Favg\u002Ftop-N) | **`$apply`** (raw) or **`client.query.sql()`** GROUP BY | Both run server-side, return only grouped results |\n| Cross-table aggregation | **`client.query.sql(\"...INNER JOIN...GROUP BY...\")`** or **`client.query.fetchxml(...)`** (server-side); else builder->DataFrame + `pd.merge()` | `sql()` supports INNER\u002FLEFT JOIN + GROUP BY; pandas merge for shapes SQL can't express |\n| \"show me X with related Y\" \u002F resolve lookups | `client.records.list(table, expand=...)` or **QueryBuilder** | Lookup resolution |\n| \"export this data\" \u002F bulk extract | **`client.query.builder(t).select(...).execute().to_dataframe()`** | Direct to DataFrame → CSV |\n| \"load into notebook\" \u002F interactive analysis | **`client.query.builder(t).select(...).execute().to_dataframe()`** | pandas native |\n| \"find duplicates\" \u002F complex filter | `client.records.list(table, filter=...)` or **QueryBuilder** | SDK handles pagination |\n| Simple filtered read (\u003C5K rows) | **CLI** `dataverse data query --sql \"SELECT ...\"`, or **`client.query.sql()`** | Lightweight single call |\n\n**Key principle:** Let the server do the work. For single-table aggregation, use `$apply` (raw) or `client.query.sql()` GROUP BY — both run server-side and return only grouped results. For cross-table questions, prefer a server-side `sql()` JOIN (INNER\u002FLEFT) or `fetchxml()` link-entity; when SQL can't express it, pull each table via `client.query.builder(t).select(...).execute().to_dataframe()` and `pd.merge()` — the merge is sub-second; the bottleneck is network transfer, which `select` minimizes.\n\n**Always query the live Dataverse environment.** Do not query local copies, cached files, or source databases when the user expects results from Dataverse. The data in Dataverse is the source of truth.\n\n---\n\n## SQL Queries — `client.query.sql()`\n\n`client.query.sql()` uses the Dataverse Web API `?sql=` parameter — a **T-SQL subset**. It **supports** `SELECT` \u002F `SELECT DISTINCT` \u002F `SELECT TOP N` (0-5000), `INNER JOIN` \u002F `LEFT JOIN`, `WHERE`, `GROUP BY`, `ORDER BY`, `OFFSET`\u002F`FETCH`, and `COUNT\u002FSUM\u002FAVG\u002FMIN\u002FMAX`. It does **NOT** support `SELECT *`, subqueries, CTEs, `HAVING`, `UNION`, `RIGHT`\u002F`FULL`\u002F`CROSS JOIN`, `CASE`, or string\u002Fdate\u002Fmath functions. Results are capped at ~5,000 rows.\n\n**When to use:** Fast filtered reads on tables with \u003C5K rows. For these, it's significantly faster (~2-6s) than page iteration or DataFrames because it's a single HTTP call.\n\n```python\n# Fast filtered read on small tables (\u003C5K rows)\nresults = client.query.sql(\n    \"SELECT TOP 100 name, estimatedvalue \"\n    \"FROM opportunity \"\n    \"WHERE statecode = 0 \"\n    \"ORDER BY estimatedvalue DESC\"\n)\nfor r in results:\n    print(f\"{r['name']}: ${r.get('estimatedvalue', 0):,.0f}\")\n```\n\n**Do NOT use for:** Tables >5K rows (results silently truncated), `SELECT *`, subqueries\u002FCTEs, `HAVING`, `UNION`, `RIGHT`\u002F`FULL`\u002F`CROSS JOIN`, or functions. `INNER`\u002F`LEFT JOIN` and `GROUP BY` **are** supported — use them for server-side joins\u002Faggregation on \u003C5K-row results; for larger or unsupported shapes use `fetchxml()` or `$apply`.\n\n## FetchXML — server-side joins and aggregates\n\nFor SQL-JOIN scenarios or aggregates the OData builder cannot express, use FetchXML. `client.query.fetchxml(xml)` returns an inert query object — no HTTP is made until you call `.execute()` (eager, all pages) or `.execute_pages()` (lazy, one page at a time). Both return `QueryResult` pages with `.to_dataframe()`.\n\n```python\nquery = client.query.fetchxml(\"\"\"\n  \u003Cfetch top=\"50\">\n    \u003Centity name=\"account\">\n      \u003Cattribute name=\"name\" \u002F>\n      \u003Clink-entity name=\"contact\" from=\"parentcustomerid\" to=\"accountid\" alias=\"c\" link-type=\"inner\">\n        \u003Cattribute name=\"fullname\" \u002F>\n      \u003C\u002Flink-entity>\n    \u003C\u002Fentity>\n  \u003C\u002Ffetch>\n\"\"\")\n\nresult = query.execute()          # collect all pages\ndf = result.to_dataframe()\n\n# Or stream one page at a time for large results:\nfor page in query.execute_pages():\n    print(page.to_dataframe().shape)\n```\n\n## Discover queryable columns — `client.query.sql_columns()`\n\nBefore writing a SQL or `$select` read, list the columns the SQL endpoint can actually query — virtual and computed lookup-display columns are excluded. Each entry has `name`, `type`, `is_pk`, `is_name`, and `label`.\n\n```python\nfor c in client.query.sql_columns(\"account\"):\n    print(f\"{c['name']:30s} {c['type']:20s} PK={c['is_pk']}\")\n```\n\nFor deeper schema inspection — full column metadata and table relationships — use `dv-metadata`\n(`client.tables.list_columns()`, `client.tables.list_relationships()`,\n`client.tables.list_table_relationships()`).\n\n## Skill boundaries\n\n| Need | Use instead |\n|---|---|\n| Explicit physical ERP SQL table read or a table read in an established JIT\u002Fsqlcmd workflow | **erp-sql** |\n| Create, update, delete records (Dataverse) | **dv-data** |\n| Query, create, update, delete records (ERP) | See [`references\u002Ferp-reads.md`](references\u002Ferp-reads.md) and [`erp-writes`](..\u002Fdv-data\u002Freferences\u002Ferp-writes.md) |\n| Create tables, columns, relationships | **dv-metadata** |\n| Export or deploy solutions | **dv-solution** |\n\n---\n\n## Setup\n\n```python\nimport os, sys\nsys.path.insert(0, os.path.join(os.getcwd(), \"scripts\"))\nfrom auth import get_client\n\n# get_client sets a plugin attribution context on the User-Agent header.\n# Do not modify the context value — it is a closed schema for server-side\n# telemetry (app\u002Fskill\u002Fagent). Never include secrets or PII.\nclient = get_client(\"dv-query\")\n```\n\n`get_client(skill)` handles auth, environment URL, and plugin attribution (User-Agent tagging). See `scripts\u002Fauth.py`. For scripts that run to completion, wrap the returned client in a `with` statement for automatic connection cleanup. For ERP, use ERP MCP or the Dataverse CLI `--target erp` path — see [`references\u002Ferp-reads.md`](references\u002Ferp-reads.md).\n\n---\n\n## Field Name Casing Rule\n\nGetting this wrong causes 400 errors.\n\n| Property type | Convention | Example | When used |\n|---|---|---|---|\n| **Structural** (columns) | LogicalName — always lowercase | `new_name`, `new_priority` | `$select`, `$filter`, `$orderby` |\n| **Navigation** (lookups) | Navigation Property Name — case-sensitive, matches `$metadata` | `new_AccountId` | `$expand` |\n\n- System table navigation properties (e.g., `parentaccountid`, `ownerid`): lowercase\n- Custom lookup navigation properties: case-sensitive, match `$metadata` SchemaName (e.g., `new_AccountId`)\n\n---\n\n## Query Records\n\n`client.records.list()` is the primary read method on the GA SDK. It collects all pages and returns a flat `QueryResult` you iterate directly (records, not pages). For very large result sets, `client.records.list_pages()` streams one `QueryResult` per HTTP page. **Always use `select=` to limit columns.**\n\n```python\n# list() -- flat QueryResult, iterate records directly\nresult = client.records.list(\n    \"new_ticket\",\n    select=[\"new_name\", \"new_priority\", \"new_status\"],\n    filter=\"new_status eq 100000000\",\n    orderby=[\"new_name asc\"],\n    top=50,\n)\nfor r in result:\n    print(r[\"new_name\"], r[\"new_priority\"])\n\nprint(f\"{len(result)} tickets\")   # QueryResult supports len(), indexing, .first(), .to_dataframe()\n```\n\nFor large tables where you do not want every row in memory at once, stream pages:\n\n```python\nfor page in client.records.list_pages(\"new_ticket\", select=[\"new_name\"], page_size=200):\n    for r in page:          # each page is a QueryResult\n        print(r[\"new_name\"])\n```\n\nEach record is a `Record` object that supports dict-like access: `r[\"column\"]`, `r.get(\"column\")`, `r.keys()`. Do not use `r.data.get()` -- use `r.get()` directly.\n\n> **Migrating from `records.get()`:** `records.get()` is deprecated on the GA SDK. Replace `for page in client.records.get(...): for r in page:` with `for r in client.records.list(...):` (flat), or keep the page loop using `list_pages(...)`. Replace a by-GUID `records.get(table, guid)` with `records.retrieve(table, guid)` (returns `None` if not found).\n\n---\n\n## Fetch a Single Record by ID\n\n`client.records.retrieve()` returns the record, or `None` if no row has that GUID (no exception on 404).\n\n```python\nrecord = client.records.retrieve(\"new_ticket\", \"\u003Crecord-guid>\",\n    select=[\"new_name\", \"new_priority\", \"new_status\"])\nif record is not None:\n    print(record[\"new_name\"])\nelse:\n    print(\"Ticket not found\")\n```\n\n---\n\n## $select with Lookup Columns (GUID-free display)\n\nTo show display names instead of GUIDs, request the formatted value annotation via `include_annotations`:\n\n```python\nfor r in client.records.list(\"opportunity\",\n    select=[\"name\", \"estimatedvalue\", \"_parentaccountid_value\"],\n    include_annotations=\"OData.Community.Display.V1.FormattedValue\",\n):\n    account_name = r.get(\"_parentaccountid_value@OData.Community.Display.V1.FormattedValue\")\n    print(f\"{r['name']} — {account_name}\")\n```\n\n**You MUST pass `include_annotations`** — without it, the `Prefer: odata.include-annotations` header is not sent and formatted values are not in the response. Use `\"*\"` for all annotations or the specific annotation name above.\n\nFormatted values are available for lookup, choice, status, and owner fields.\n\n---\n\n## $expand — Resolve Lookup to Full Related Record\n\n```python\nfor r in client.records.list(\"opportunity\",\n    select=[\"name\", \"estimatedvalue\"],\n    expand=[\"parentaccountid($select=name)\"],   # nested $select avoids fetching all account columns\n):\n    account = r.get(\"parentaccountid\") or {}\n    print(f\"{r['name']} — {account.get('name', 'Unknown')}\")\n```\n\nAlways use nested `$select` inside `$expand` — without it, Dataverse returns every column on the related entity, which wastes bandwidth and memory.\n\n### $expand with multiple custom lookups\n\n```python\nfor r in client.records.list(\n    \"new_ticket\",\n    select=[\"new_name\", \"new_priority\", \"new_status\"],\n    expand=[\"new_CustomerId($select=new_name)\", \"new_AgentId($select=new_name)\"],  # nested $select + case-sensitive nav props\n):\n    customer = r.get(\"new_CustomerId\") or {}\n    agent    = r.get(\"new_AgentId\") or {}\n    print(f\"{r['new_name']} | {customer.get('new_name','')} | {agent.get('new_name','')}\")\n```\n\n> `expand` uses the Navigation Property Name (`new_CustomerId`), not the lowercase logical name (`new_customerid`). Using lowercase causes a 400 error.\n\n---\n\n## Advanced query patterns (raw Web API)\n\nThe raw OData `$apply` transform is the one pattern with no SDK method. The SDK **does** cover aggregation\u002Fjoins — `client.query.sql()` (INNER\u002FLEFT JOIN, GROUP BY, COUNT\u002FSUM\u002FAVG) and `client.query.fetchxml()` (aggregate + link-entity) — and N:N `$expand` reads via `client.records.list(\u003Ctable>, expand=[\"\u003Cn:n_nav>\"])` or `client.query.builder(\u003Ctable>).expand(...)`. Reach for raw Web API only for the `$apply` transform. See [`references\u002Fweb-api-advanced.md`](references\u002Fweb-api-advanced.md) for full code samples.\n\n**Quick reference:**\n- **`$expand` on N:N relationships:** prefer SDK `client.records.list(\u003Ctable>, expand=[\"\u003Cn:n_nav>\"])` \u002F `builder().expand()`. Raw form: `GET \u002F\u003CentitySet>?$expand=\u003Cn:n_nav>($select=...)` — single page only; follow `@odata.nextLink` for >5,000 results.\n- **`$apply` for aggregations:** runs server-side, returns grouped results in one call. Patterns: `groupby((col),aggregate(metric with sum as total))`, `aggregate($count as count)`, `aggregate(amount with average as avg)`. 50K source-record limit.\n- **Cross-table aggregation:** `$apply` only works within one entity set. Prefer `client.query.sql()` (INNER\u002FLEFT JOIN + GROUP BY) or `fetchxml()` link-entity; else pull each table via `client.query.builder(t).select(...).execute().to_dataframe()` → `pd.merge()` → `groupby()`. Always pass `select`; without it transfers 10-20x more data.\n\n## QueryBuilder — Fluent Query API\n\nChainable builder for complex queries that would be awkward as a single OData URL or FetchXML string. Full reference and examples in [`references\u002Fquerybuilder.md`](references\u002Fquerybuilder.md).\n\n## Jupyter Notebook Setup\n\nFor interactive querying in notebooks (auth + DataverseClient + DataFrame display), see [`references\u002Fjupyter-setup.md`](references\u002Fjupyter-setup.md).\n\n## Querying ERP data\n\nOn ERP-linked envs, ERP reads do not go through `DataverseClient`. Use ERP MCP or `dataverse data query\u002Fget\u002Fcount --target erp`. See [`references\u002Ferp-reads.md`](references\u002Ferp-reads.md).\n\n## Common Query Errors\n\n| Status | Cause | Fix |\n|---|---|---|\n| 400 | Wrong field casing in `$select`\u002F`$filter` (must be lowercase LogicalName) or `$expand` (must be case-sensitive Navigation Property Name) | Verify names via `EntityDefinitions(LogicalName='...')\u002FAttributes` |\n| 400 | Unsupported SQL — MCP `read_query` rejects DISTINCT\u002FHAVING\u002Fsubqueries\u002FOFFSET\u002FUNION\u002FCAST\u002FCONVERT\u002FCASE\u002Fdate-functions (but **allows** JOIN + GROUP BY); `client.query.sql()` rejects `SELECT *`\u002Fsubqueries\u002FCTE\u002FHAVING\u002FUNION\u002FRIGHT\u002FFULL\u002FCROSS JOIN\u002Ffunctions (but **allows** INNER\u002FLEFT JOIN, GROUP BY, DISTINCT) | Use `fetchxml()`\u002F`$apply` for shapes `sql()` can't express, or pandas for cross-table |\n| 404 | Table logical name not found | Check spelling — use `client.tables.get(\"\u003Cname>\")` to verify |\n| 429 | Rate limited | SDK retries automatically; reduce page size or add delays between pages |\n\nFor `HttpError` handling in SDK scripts, see the error handling pattern in **dv-data**.\n\n---\n\n## Windows Scripting Notes\n\n- **ASCII only** in `.py` files — curly quotes and em dashes cause `SyntaxError` on Windows.\n- **No `python -c` for multiline code** — write a `.py` file instead.\n- **Generate GUIDs in scripts**: `str(uuid.uuid4())`, not shell backtick substitution.\n","# Skill: Query — Read and Analyze Dataverse Records\n\n> **This skill uses Python and the Dataverse CLI.** Do not use Node.js, JavaScript, or any other language for Dataverse scripting. See the overview skill's Hard Rules.\n\n## Reads: prefer a managed surface, choose by shape\n\n**Fast path for simple reads:** If `dataverse auth who` shows an active profile, skip workspace setup and query directly with the CLI examples below. No `.env`, `auth.py`, pip install, or PAC needed for data reads.\n\nPick **MCP, the Dataverse CLI, or the SDK by the shape of the read** — all three handle auth and retry (see the routing table below and the overview's **Tool Capabilities** \u002F Hard Rule 2). MCP fits small, interactive reads; the CLI fits headless one-liners (OData, SQL, count); the SDK fits bulk iteration and analytics. For `$apply` aggregation and N:N `$expand`, prefer `client.query.fetchxml()` (aggregates + link-entity) or the managed `dataverse api` escape hatch; reach for hand-rolled `urllib`\u002F`get_token()` **only** to stay in-process inside a tight Python loop (e.g. paging thousands of rows with client-side processing — see web-api-advanced.md).\n\n### Dataverse CLI gotchas (custom tables + Windows)\n\nWhen you drive the `dataverse` CLI directly (headless reads\u002FCRUD; note the CLI needs .NET + a keyring, so it is blocked on ChatGPT web \u002F Codex cloud — use the SDK there), two empirical traps:\n\n- **Custom-table SQL pluralization.** `dataverse data query` in SQL mode auto-pluralizes the table name, and irregular plurals resolve wrong: `FROM im_category` looks up entity set `im_categorys` and returns a **404** that reads like \"table missing.\" It is not — switch to OData mode with the explicit entity set: `dataverse data query --table im_categories --select im_name`. Discover the real `EntitySetName` from `EntityDefinitions` when unsure; never conclude the table doesn't exist from this 404.\n- **Windows shell quoting.** Wrap the whole `--path` value in double quotes so `cmd.exe`\u002FPowerShell don't treat `&` as a command separator. Keep `&` **literal** — it separates OData query options; encoding it to `%26` merges them and breaks the query. Encode only `$`->`%24` (in PowerShell a bare `$select` is read as a variable). If an unquoted `&` splits the command, the wrapper can exit nonzero *even when the API returned valid JSON* — quoting prevents it. (This is why the `dataverse api request` examples in other skills quote the path, use `%24`, and leave `&` literal.)\n\n### Dataverse CLI query examples (copy-paste ready)\n\nAll `dataverse` commands take `--context` for skill attribution (global flag).\n\n```bash\n# OData filtered read (--table takes the EntitySet name, e.g. accounts not account)\ndataverse data query --table accounts --select \"name,accountid\" --filter \"name eq 'john'\" --top 10 --json --context \"app=dataverse-skills\u002F\u003Cver>;skill=dv-query;agent=\u003Cagent>\"\n\n# Count records\ndataverse data count --table accounts --context \"app=dataverse-skills\u002F\u003Cver>;skill=dv-query;agent=\u003Cagent>\"\n\n# SQL mode (uses the logical name, e.g. account not accounts)\ndataverse data query --sql \"SELECT name, accountid FROM account WHERE name LIKE '%john%'\" --json --context \"app=dataverse-skills\u002F\u003Cver>;skill=dv-query;agent=\u003Cagent>\"\n\n# Get single record by ID\ndataverse data get --table accounts --id \u003Cguid> --json --context \"app=dataverse-skills\u002F\u003Cver>;skill=dv-query;agent=\u003Cagent>\"\n\n# Raw API escape hatch\ndataverse api request --target dataverse --path \"\u002Fapi\u002Fdata\u002Fv9.2\u002Faccounts?%24select=name&%24top=5\" --context \"app=dataverse-skills\u002F\u003Cver>;skill=dv-query;agent=\u003Cagent>\"\n```\n\n**ERP target is a separate path.** ERP (Finance and Operations), when linked to a Dataverse env, does not go through the Python SDK. See [`references\u002Ferp-reads.md`](references\u002Ferp-reads.md).\n\n## How to Answer Data Questions\n\nWhen the user asks a question about their data, pick the approach by **what they're asking**, not by which API you know:\n\n| User asks... | Approach | Why |\n|---|---|---|\n| \"show me open tickets\" \u002F simple filter | **MCP** `read_query`, **CLI** `dataverse data query --table ... --filter ...`, or `client.records.list(table, filter=...)` | Small result, no aggregation |\n| \"how many X\" \u002F simple count | **CLI** `dataverse data count --table ...`, **MCP** `read_query`, or `client.query.sql(\"SELECT COUNT(*) ...\")` | Server-side count (no row download) |\n| Single-table aggregation (most\u002Fsum\u002Favg\u002Ftop-N) | **`$apply`** (raw) or **`client.query.sql()`** GROUP BY | Both run server-side, return only grouped results |\n| Cross-table aggregation | **`client.query.sql(\"...INNER JOIN...GROUP BY...\")`** or **`client.query.fetchxml(...)`** (server-side); else builder->DataFrame + `pd.merge()` | `sql()` supports INNER\u002FLEFT JOIN + GROUP BY; pandas merge for shapes SQL can't express |\n| \"show me X with related Y\" \u002F resolve lookups | `client.records.list(table, expand=...)` or **QueryBuilder** | Lookup resolution |\n| \"export this data\" \u002F bulk extract | **`client.query.builder(t).select(...).execute().to_dataframe()`** | Direct to DataFrame → CSV |\n| \"load into notebook\" \u002F interactive analysis | **`client.query.builder(t).select(...).execute().to_dataframe()`** | pandas native |\n| \"find duplicates\" \u002F complex filter | `client.records.list(table, filter=...)` or **QueryBuilder** | SDK handles pagination |\n| Simple filtered read (\u003C5K rows) | **CLI** `dataverse data query --sql \"SELECT ...\"`, or **`client.query.sql()`** | Lightweight single call |\n\n**Key principle:** Let the server do the work. For single-table aggregation, use `$apply` (raw) or `client.query.sql()` GROUP BY — both run server-side and return only grouped results. For cross-table questions, prefer a server-side `sql()` JOIN (INNER\u002FLEFT) or `fetchxml()` link-entity; when SQL can't express it, pull each table via `client.query.builder(t).select(...).execute().to_dataframe()` and `pd.merge()` — the merge is sub-second; the bottleneck is network transfer, which `select` minimizes.\n\n**Always query the live Dataverse environment.** Do not query local copies, cached files, or source databases when the user expects results from Dataverse. The data in Dataverse is the source of truth.\n\n---\n\n## SQL Queries — `client.query.sql()`\n\n`client.query.sql()` uses the Dataverse Web API `?sql=` parameter — a **T-SQL subset**. It **supports** `SELECT` \u002F `SELECT DISTINCT` \u002F `SELECT TOP N` (0-5000), `INNER JOIN` \u002F `LEFT JOIN`, `WHERE`, `GROUP BY`, `ORDER BY`, `OFFSET`\u002F`FETCH`, and `COUNT\u002FSUM\u002FAVG\u002FMIN\u002FMAX`. It does **NOT** support `SELECT *`, subqueries, CTEs, `HAVING`, `UNION`, `RIGHT`\u002F`FULL`\u002F`CROSS JOIN`, `CASE`, or string\u002Fdate\u002Fmath functions. Results are capped at ~5,000 rows.\n\n**When to use:** Fast filtered reads on tables with \u003C5K rows. For these, it's significantly faster (~2-6s) than page iteration or DataFrames because it's a single HTTP call.\n\n```python\n# Fast filtered read on small tables (\u003C5K rows)\nresults = client.query.sql(\n    \"SELECT TOP 100 name, estimatedvalue \"\n    \"FROM opportunity \"\n    \"WHERE statecode = 0 \"\n    \"ORDER BY estimatedvalue DESC\"\n)\nfor r in results:\n    print(f\"{r['name']}: ${r.get('estimatedvalue', 0):,.0f}\")\n```\n\n**Do NOT use for:** Tables >5K rows (results silently truncated), `SELECT *`, subqueries\u002FCTEs, `HAVING`, `UNION`, `RIGHT`\u002F`FULL`\u002F`CROSS JOIN`, or functions. `INNER`\u002F`LEFT JOIN` and `GROUP BY` **are** supported — use them for server-side joins\u002Faggregation on \u003C5K-row results; for larger or unsupported shapes use `fetchxml()` or `$apply`.\n\n## FetchXML — server-side joins and aggregates\n\nFor SQL-JOIN scenarios or aggregates the OData builder cannot express, use FetchXML. `client.query.fetchxml(xml)` returns an inert query object — no HTTP is made until you call `.execute()` (eager, all pages) or `.execute_pages()` (lazy, one page at a time). Both return `QueryResult` pages with `.to_dataframe()`.\n\n```python\nquery = client.query.fetchxml(\"\"\"\n  \u003Cfetch top=\"50\">\n    \u003Centity name=\"account\">\n      \u003Cattribute name=\"name\" \u002F>\n      \u003Clink-entity name=\"contact\" from=\"parentcustomerid\" to=\"accountid\" alias=\"c\" link-type=\"inner\">\n        \u003Cattribute name=\"fullname\" \u002F>\n      \u003C\u002Flink-entity>\n    \u003C\u002Fentity>\n  \u003C\u002Ffetch>\n\"\"\")\n\nresult = query.execute()          # collect all pages\ndf = result.to_dataframe()\n\n# Or stream one page at a time for large results:\nfor page in query.execute_pages():\n    print(page.to_dataframe().shape)\n```\n\n## Discover queryable columns — `client.query.sql_columns()`\n\nBefore writing a SQL or `$select` read, list the columns the SQL endpoint can actually query — virtual and computed lookup-display columns are excluded. Each entry has `name`, `type`, `is_pk`, `is_name`, and `label`.\n\n```python\nfor c in client.query.sql_columns(\"account\"):\n    print(f\"{c['name']:30s} {c['type']:20s} PK={c['is_pk']}\")\n```\n\nFor deeper schema inspection — full column metadata and table relationships — use `dv-metadata`\n(`client.tables.list_columns()`, `client.tables.list_relationships()`,\n`client.tables.list_table_relationships()`).\n\n## Skill boundaries\n\n| Need | Use instead |\n|---|---|\n| Explicit physical ERP SQL table read or a table read in an established JIT\u002Fsqlcmd workflow | **erp-sql** |\n| Create, update, delete records (Dataverse) | **dv-data** |\n| Query, create, update, delete records (ERP) | See [`references\u002Ferp-reads.md`](references\u002Ferp-reads.md) and [`erp-writes`](..\u002Fdv-data\u002Freferences\u002Ferp-writes.md) |\n| Create tables, columns, relationships | **dv-metadata** |\n| Export or deploy solutions | **dv-solution** |\n\n---\n\n## Setup\n\n```python\nimport os, sys\nsys.path.insert(0, os.path.join(os.getcwd(), \"scripts\"))\nfrom auth import get_client\n\n# get_client sets a plugin attribution context on the User-Agent header.\n# Do not modify the context value — it is a closed schema for server-side\n# telemetry (app\u002Fskill\u002Fagent). Never include secrets or PII.\nclient = get_client(\"dv-query\")\n```\n\n`get_client(skill)` handles auth, environment URL, and plugin attribution (User-Agent tagging). See `scripts\u002Fauth.py`. For scripts that run to completion, wrap the returned client in a `with` statement for automatic connection cleanup. For ERP, use ERP MCP or the Dataverse CLI `--target erp` path — see [`references\u002Ferp-reads.md`](references\u002Ferp-reads.md).\n\n---\n\n## Field Name Casing Rule\n\nGetting this wrong causes 400 errors.\n\n| Property type | Convention | Example | When used |\n|---|---|---|---|\n| **Structural** (columns) | LogicalName — always lowercase | `new_name`, `new_priority` | `$select`, `$filter`, `$orderby` |\n| **Navigation** (lookups) | Navigation Property Name — case-sensitive, matches `$metadata` | `new_AccountId` | `$expand` |\n\n- System table navigation properties (e.g., `parentaccountid`, `ownerid`): lowercase\n- Custom lookup navigation properties: case-sensitive, match `$metadata` SchemaName (e.g., `new_AccountId`)\n\n---\n\n## Query Records\n\n`client.records.list()` is the primary read method on the GA SDK. It collects all pages and returns a flat `QueryResult` you iterate directly (records, not pages). For very large result sets, `client.records.list_pages()` streams one `QueryResult` per HTTP page. **Always use `select=` to limit columns.**\n\n```python\n# list() -- flat QueryResult, iterate records directly\nresult = client.records.list(\n    \"new_ticket\",\n    select=[\"new_name\", \"new_priority\", \"new_status\"],\n    filter=\"new_status eq 100000000\",\n    orderby=[\"new_name asc\"],\n    top=50,\n)\nfor r in result:\n    print(r[\"new_name\"], r[\"new_priority\"])\n\nprint(f\"{len(result)} tickets\")   # QueryResult supports len(), indexing, .first(), .to_dataframe()\n```\n\nFor large tables where you do not want every row in memory at once, stream pages:\n\n```python\nfor page in client.records.list_pages(\"new_ticket\", select=[\"new_name\"], page_size=200):\n    for r in page:          # each page is a QueryResult\n        print(r[\"new_name\"])\n```\n\nEach record is a `Record` object that supports dict-like access: `r[\"column\"]`, `r.get(\"column\")`, `r.keys()`. Do not use `r.data.get()` -- use `r.get()` directly.\n\n> **Migrating from `records.get()`:** `records.get()` is deprecated on the GA SDK. Replace `for page in client.records.get(...): for r in page:` with `for r in client.records.list(...):` (flat), or keep the page loop using `list_pages(...)`. Replace a by-GUID `records.get(table, guid)` with `records.retrieve(table, guid)` (returns `None` if not found).\n\n---\n\n## Fetch a Single Record by ID\n\n`client.records.retrieve()` returns the record, or `None` if no row has that GUID (no exception on 404).\n\n```python\nrecord = client.records.retrieve(\"new_ticket\", \"\u003Crecord-guid>\",\n    select=[\"new_name\", \"new_priority\", \"new_status\"])\nif record is not None:\n    print(record[\"new_name\"])\nelse:\n    print(\"Ticket not found\")\n```\n\n---\n\n## $select with Lookup Columns (GUID-free display)\n\nTo show display names instead of GUIDs, request the formatted value annotation via `include_annotations`:\n\n```python\nfor r in client.records.list(\"opportunity\",\n    select=[\"name\", \"estimatedvalue\", \"_parentaccountid_value\"],\n    include_annotations=\"OData.Community.Display.V1.FormattedValue\",\n):\n    account_name = r.get(\"_parentaccountid_value@OData.Community.Display.V1.FormattedValue\")\n    print(f\"{r['name']} — {account_name}\")\n```\n\n**You MUST pass `include_annotations`** — without it, the `Prefer: odata.include-annotations` header is not sent and formatted values are not in the response. Use `\"*\"` for all annotations or the specific annotation name above.\n\nFormatted values are available for lookup, choice, status, and owner fields.\n\n---\n\n## $expand — Resolve Lookup to Full Related Record\n\n```python\nfor r in client.records.list(\"opportunity\",\n    select=[\"name\", \"estimatedvalue\"],\n    expand=[\"parentaccountid($select=name)\"],   # nested $select avoids fetching all account columns\n):\n    account = r.get(\"parentaccountid\") or {}\n    print(f\"{r['name']} — {account.get('name', 'Unknown')}\")\n```\n\nAlways use nested `$select` inside `$expand` — without it, Dataverse returns every column on the related entity, which wastes bandwidth and memory.\n\n### $expand with multiple custom lookups\n\n```python\nfor r in client.records.list(\n    \"new_ticket\",\n    select=[\"new_name\", \"new_priority\", \"new_status\"],\n    expand=[\"new_CustomerId($select=new_name)\", \"new_AgentId($select=new_name)\"],  # nested $select + case-sensitive nav props\n):\n    customer = r.get(\"new_CustomerId\") or {}\n    agent    = r.get(\"new_AgentId\") or {}\n    print(f\"{r['new_name']} | {customer.get('new_name','')} | {agent.get('new_name','')}\")\n```\n\n> `expand` uses the Navigation Property Name (`new_CustomerId`), not the lowercase logical name (`new_customerid`). Using lowercase causes a 400 error.\n\n---\n\n## Advanced query patterns (raw Web API)\n\nThe raw OData `$apply` transform is the one pattern with no SDK method. The SDK **does** cover aggregation\u002Fjoins — `client.query.sql()` (INNER\u002FLEFT JOIN, GROUP BY, COUNT\u002FSUM\u002FAVG) and `client.query.fetchxml()` (aggregate + link-entity) — and N:N `$expand` reads via `client.records.list(\u003Ctable>, expand=[\"\u003Cn:n_nav>\"])` or `client.query.builder(\u003Ctable>).expand(...)`. Reach for raw Web API only for the `$apply` transform. See [`references\u002Fweb-api-advanced.md`](references\u002Fweb-api-advanced.md) for full code samples.\n\n**Quick reference:**\n- **`$expand` on N:N relationships:** prefer SDK `client.records.list(\u003Ctable>, expand=[\"\u003Cn:n_nav>\"])` \u002F `builder().expand()`. Raw form: `GET \u002F\u003CentitySet>?$expand=\u003Cn:n_nav>($select=...)` — single page only; follow `@odata.nextLink` for >5,000 results.\n- **`$apply` for aggregations:** runs server-side, returns grouped results in one call. Patterns: `groupby((col),aggregate(metric with sum as total))`, `aggregate($count as count)`, `aggregate(amount with average as avg)`. 50K source-record limit.\n- **Cross-table aggregation:** `$apply` only works within one entity set. Prefer `client.query.sql()` (INNER\u002FLEFT JOIN + GROUP BY) or `fetchxml()` link-entity; else pull each table via `client.query.builder(t).select(...).execute().to_dataframe()` → `pd.merge()` → `groupby()`. Always pass `select`; without it transfers 10-20x more data.\n\n## QueryBuilder — Fluent Query API\n\nChainable builder for complex queries that would be awkward as a single OData URL or FetchXML string. Full reference and examples in [`references\u002Fquerybuilder.md`](references\u002Fquerybuilder.md).\n\n## Jupyter Notebook Setup\n\nFor interactive querying in notebooks (auth + DataverseClient + DataFrame display), see [`references\u002Fjupyter-setup.md`](references\u002Fjupyter-setup.md).\n\n## Querying ERP data\n\nOn ERP-linked envs, ERP reads do not go through `DataverseClient`. Use ERP MCP or `dataverse data query\u002Fget\u002Fcount --target erp`. See [`references\u002Ferp-reads.md`](references\u002Ferp-reads.md).\n\n## Common Query Errors\n\n| Status | Cause | Fix |\n|---|---|---|\n| 400 | Wrong field casing in `$select`\u002F`$filter` (must be lowercase LogicalName) or `$expand` (must be case-sensitive Navigation Property Name) | Verify names via `EntityDefinitions(LogicalName='...')\u002FAttributes` |\n| 400 | Unsupported SQL — MCP `read_query` rejects DISTINCT\u002FHAVING\u002Fsubqueries\u002FOFFSET\u002FUNION\u002FCAST\u002FCONVERT\u002FCASE\u002Fdate-functions (but **allows** JOIN + GROUP BY); `client.query.sql()` rejects `SELECT *`\u002Fsubqueries\u002FCTE\u002FHAVING\u002FUNION\u002FRIGHT\u002FFULL\u002FCROSS JOIN\u002Ffunctions (but **allows** INNER\u002FLEFT JOIN, GROUP BY, DISTINCT) | Use `fetchxml()`\u002F`$apply` for shapes `sql()` can't express, or pandas for cross-table |\n| 404 | Table logical name not found | Check spelling — use `client.tables.get(\"\u003Cname>\")` to verify |\n| 429 | Rate limited | SDK retries automatically; reduce page size or add delays between pages |\n\nFor `HttpError` handling in SDK scripts, see the error handling pattern in **dv-data**.\n\n---\n\n## Windows Scripting Notes\n\n- **ASCII only** in `.py` files — curly quotes and em dashes cause `SyntaxError` on Windows.\n- **No `python -c` for multiline code** — write a `.py` file instead.\n- **Generate GUIDs in scripts**: `str(uuid.uuid4())`, not shell backtick substitution.\n",{"name":5,"description":7},"main","65bb1d3b311d2fd2ba4b9c5918f81712fed43a33",".github\u002Fplugins\u002Fdataverse\u002Fskills\u002Fdv-query",65,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 08:33:20",{"source":9,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add microsoft\u002FDataverse-skills --skill dv-query",{"tool":71,"command":72},"bunx","bunx skills add microsoft\u002FDataverse-skills --skill dv-query",{"tool":74,"command":75},"pnpm","pnpm dlx skills add microsoft\u002FDataverse-skills --skill dv-query","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fdataverse\u002Fskills\u002Fdv-query\u002FSKILL.md",true,[79,85,89,93],{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Ferp-reads.md","REFERENCE","参考文档",5115,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fdataverse\u002Fskills\u002Fdv-query\u002Freferences\u002Ferp-reads.md",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fjupyter-setup.md",1968,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fdataverse\u002Fskills\u002Fdv-query\u002Freferences\u002Fjupyter-setup.md",{"path":90,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fquerybuilder.md",5053,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fdataverse\u002Fskills\u002Fdv-query\u002Freferences\u002Fquerybuilder.md",{"path":94,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fweb-api-advanced.md",7151,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fdataverse\u002Fskills\u002Fdv-query\u002Freferences\u002Fweb-api-advanced.md",[98,123,155,172,189,217],{"skillNo":99,"name":100,"nameZh":17,"description":101,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":51},"01M6PJ8NCTZS7PZ5AVHXERS10A","erp-sql","Temporary Finance and Operations SQL access and bounded physical-table reads for unified development environments (UDEs) only, requiring the environment System administrator (sysAdmin) role. Use when the user explicitly requests direct ERP SQL access, a temporary SQL password, a sqlcmd connection, or a table read in an established ERP SQL workflow.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fdataverse\u002Fskills\u002Ferp-sql\u002FSKILL.md",[],[105,106,107,108,109,110,111,41,112,113,114,115,116,117,118,119,120,44,121,122],"erp sql","sql","erp","development","operations","requests","password","sqlcmd","system","environment","for","only","table","bounded","environments","direct","workflow","access",{"skillNo":124,"name":125,"nameZh":126,"description":127,"descriptionZh":128,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":129,"categories":130,"keywords":137,"publishedAt":51},"01M69AR6XKM814KPH4PEEQE7R7","erp-xpp","X++ 代码开发与部署","X++ code development lifecycle for Finance and Operations — scaffold models, author classes, custom services\u002FAPIs, and data entities, install matching SDKs, compile deployable packages, deploy packages, synchronize databases, and verify deployed artifacts. Use when the user explicitly requests creating, building, compiling, packaging, deploying, DB-syncing, or verifying X++ customizations, or an end-to-end ERP code change.","面向 Finance and Operations 的 X++ 代码开发生命周期——搭建模型、编写类、自定义服务\u002FAPI 和数据实体，安装匹配的 SDK，编译可部署包、部署包、同步数据库，并验证已部署的工件。当用户明确要求创建、构建、编译、打包、部署 X++ 自定义项、同步数据库或进行验证，或进行端到端的 ERP 代码变更时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fdataverse\u002Fskills\u002Ferp-xpp\u002FSKILL.md",[131,134],{"categoryNo":132,"categoryName":133,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",{"categoryNo":135,"categoryName":136,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BT7QVANT4709358VEJK53E","代码实现",[138,139,107,140,141,108,115,142,143,144,145,146,147,148,149,150,151,152,153,154],"xpp","erp xpp","compiling","sdks","compile","lifecycle","custom","data","install","packages","development lifecycle","code","change","databases","db","packaging","end",{"skillNo":156,"name":157,"nameZh":158,"description":159,"descriptionZh":160,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":161,"categories":162,"keywords":167,"publishedAt":51},"01M69AR3MEKCYBD8FEKK80KJ5B","dv-solution","Dataverse 解决方案部署管理","Dataverse solution lifecycle — create, export, import, promote across environments, and validate deployments. Use when the user wants to package customizations, deploy to another environment, or move work between dev \u002F test \u002F prod.","Dataverse 解决方案生命周期——创建、导出、导入、跨环境提升以及验证部署。当用户想要打包自定义配置、部署到其他环境，或在开发\u002F测试\u002F生产环境之间迁移工作成果时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fdataverse\u002Fskills\u002Fdv-solution\u002FSKILL.md",[163,164],{"categoryNo":132,"categoryName":133,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":165,"categoryName":166,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQNXPY1AV6BSR5VKHDMWRH","部署与发布管理",[168,169,170,171,50],"dv solution","test","validate","deploy",{"skillNo":173,"name":174,"nameZh":175,"description":176,"descriptionZh":177,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":178,"categories":179,"keywords":186,"publishedAt":51},"01M69AR0SGRQFYSFT071ZAS19V","dv-security","Dataverse 安全权限管理","Security-role assignment, user access, application users, business units, and admin self-elevation in Dataverse environments. Use when the user wants to give someone access, grant a role, become an admin, or add a service principal.","Dataverse 环境中的安全角色分配、用户访问、应用程序用户、业务单元以及管理员自我提权。当用户想要授予某人访问权限、授予角色、成为管理员或添加服务主体时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fdataverse\u002Fskills\u002Fdv-security\u002FSKILL.md",[180,183],{"categoryNo":181,"categoryName":182,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师",{"categoryNo":184,"categoryName":185,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BTFDX7M21YT75733H52N36","身份与访问管理",[187,188,50],"dv security","security",{"skillNo":190,"name":191,"nameZh":192,"description":193,"descriptionZh":194,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":195,"categories":196,"keywords":201,"publishedAt":51},"01M69AQSP7EV1XGQAA69Y9MJ8Y","dv-overview","Dataverse\u002FPower Platform 总览","Foundational cross-cutting context for Dataverse \u002F Power Platform work — scope and the skill map, the tool-capability reference, the safety rules, and the safe change lifecycle. Use when the user mentions Dataverse, Dynamics 365, Power Platform, CRM, or ERP; load this first for orientation. Specialist skills self-route via their own frontmatter triggers. Finance and Operations \u002F F&O business-data requests also require this skill first, then dv-query for reads.","Dataverse \u002F Power Platform 工作的基础性跨领域上下文——包括范围与技能图谱、工具能力参考、安全规则以及安全变更生命周期。当用户提及 Dataverse、Dynamics 365、Power Platform、CRM 或 ERP 时使用；应首先加载此技能以进行定位。专家技能通过其自身的 frontmatter 触发器自行路由。财务与运营（Finance and Operations \u002F F&O）业务数据请求也需要先加载此技能，然后再使用 dv-query 进行读取。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fdataverse\u002Fskills\u002Fdv-overview\u002FSKILL.md",[197,198],{"categoryNo":132,"categoryName":133,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":199,"categoryName":200,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BWKS60NTYJHFE9FQSXGDKS","低代码应用开发",[202,203,145,150,204,50,205,206,207,208,32,209,210,211,212,213,214,215,216,107],"overview","dv overview","safe","power","scope","skill map","map","self","route","work","crm","Safety","frontmatter","context","capability",{"skillNo":218,"name":219,"nameZh":220,"description":221,"descriptionZh":222,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":223,"categories":224,"keywords":227,"publishedAt":51},"01M69AQP3WCSN3K3DCRD0E2PFF","dv-metadata","Dataverse 数据模型设计与查看","Dataverse schema authoring and inspection — tables, columns, relationships, forms, and views. Use when the user wants to define, evolve, or inspect the data model — add a column, create a table, set up a lookup, customize a form, build a view, or list existing columns and relationships.","Dataverse 架构编写与检查——表、列、关系、表单和视图。当用户希望定义、演进或检查数据模型时使用——添加列、创建表、设置查找（lookup）、自定义表单、构建视图，或列出现有的列和关系。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDataverse-skills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fdataverse\u002Fskills\u002Fdv-metadata\u002FSKILL.md",[225,226],{"categoryNo":132,"categoryName":133,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":199,"categoryName":200,"taxonomyType":23,"taxonomyTypeDesc":24},[228,50,229],"dv metadata","customize"]