OData 4.x covering Entity Data Model, system query options ($filter, $select, $expand, $orderby, $apply), CSDL metadata, batch requests, functions/actions, and Microsoft/SAP ecosystem integration. Use for \"OData\", \"$filter\", \"$select\", \"$expand\", \"$orderby\", \"$apply\", \"$count\", \"$search\", \"$batch\", \"EDM\", \"CSDL\", \"$metadata\", \"OData query\", \"lambda operator\", \"any\", \"all\", \"navigation property\", \"deep insert\", \"Power BI OData\", \"SAP OData\", \"OData acti...
Pro scans all 4 files and shows the line behind each finding
Scanned 9/24/2026
npx -y skills add chrishuffman5/domain-expert --skill odata --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Odata?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/chrishuffman5-odata)More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.
---
name: odata
description: "OData 4.x covering Entity Data Model, system query options ($filter, $select, $expand, $orderby, $apply), CSDL metadata, batch requests, functions/actions, and Microsoft/SAP ecosystem integration. Use for \"OData\", \"$filter\", \"$select\", \"$expand\", \"$orderby\", \"$apply\", \"$count\", \"$search\", \"$batch\", \"EDM\", \"CSDL\", \"$metadata\", \"OData query\", \"lambda operator\", \"any\", \"all\", \"navigation property\", \"deep insert\", \"Power BI OData\", \"SAP OData\", \"OData action\", \"OData function\"."
license: MIT
---
# OData 4.x
This skill covers OData (Open Data Protocol), the OASIS standard for RESTful data services. Current versions: OData 4.0 (2014), 4.01 (2020), 4.02 (committee draft 2024). It has deep knowledge of:
- Entity Data Model (EDM): entity types, complex types, navigation properties, inheritance
- System query options: `$filter`, `$select`, `$expand`, `$orderby`, `$top`, `$skip`, `$count`, `$search`, `$apply`, `$format`
- CSDL metadata document (`$metadata`) and service document
- CRUD operations, deep insert, upsert
- Functions (side-effect-free) and Actions (side effects)
- Batch requests (`$batch` -- multipart and JSON formats)
- Lambda operators (`any`, `all`) for collection filtering
- Data aggregation via `$apply` (groupby, aggregate, filter, compute)
- Microsoft ecosystem: Azure, SharePoint, Dynamics 365, Power Platform
- SAP ecosystem: SAP Gateway, S/4HANA OData APIs
## How to Approach Tasks
1. **Classify** the request:
- **Data model / schema design** -- Load `references/architecture.md` for EDM, CSDL, entity/complex types, navigation properties
- **Query design / best practices** -- Load `references/best-practices.md` for query options, aggregation, batch, performance
- **Troubleshooting / diagnostics** -- Load `references/diagnostics.md` for query errors, metadata issues, batch failures
- **Cross-protocol comparison** -- Read the `overview` skill
2. **Gather context** -- OData version (4.0 vs 4.01), server framework (.NET, SAP, Java), consumer tooling (Power BI, Excel, custom client)
3. **Analyze** -- Apply OData-specific reasoning: query option composition, metadata-driven client generation, aggregation pipeline design.
4. **Recommend** -- Provide URL examples, CSDL snippets, and server configuration.
## Core Architecture
### Entity Data Model
**Entity Type**: structured type with a key (like a database table row). **Complex Type**: structured type without a key (embedded value). **Entity Set**: collection of entities (addressable via URL). **Singleton**: single entity instance.
### System Query Options
| Option | Purpose | Example |
|---|---|---|
| `$filter` | Filter by boolean expression | `$filter=Price gt 20` |
| `$select` | Return only specified properties | `$select=Name,Price` |
| `$expand` | Include related entities inline | `$expand=Items($select=Name)` |
| `$orderby` | Sort results | `$orderby=Price desc` |
| `$top` / `$skip` | Pagination | `$top=10&$skip=20` |
| `$count` | Include total count | `$count=true` |
| `$search` | Full-text search | `$search=widget` |
| `$apply` | Aggregation pipeline | `$apply=groupby((Category),aggregate($count as Count))` |
### Lambda Operators
`any` (at least one element matches) and `all` (every element matches):
```
$filter=Tags/any(t: contains(t, 'sale'))
$filter=Reviews/all(r: r/Rating ge 4)
```
### Metadata
`$metadata` endpoint exposes full schema as CSDL. Consumer tooling generates clients from this.
## Anti-Patterns
1. **No `$select` on large entity types** -- Returning all 50 columns when client needs 3. Always encourage `$select`.
2. **Unbounded `$expand`** -- `$expand=*` without limits can generate enormous responses. Restrict expansion depth.
3. **`$skip` on large datasets** -- Offset pagination degrades on large tables. Use server-driven paging with `@odata.nextLink`.
4. **Ignoring `@odata.nextLink`** -- Server-side paging is mandatory for large result sets. Clients must follow `@odata.nextLink`.
5. **Batch without changesets for atomic operations** -- Related modifications must be in a changeset for atomicity.
6. **Actions when Functions suffice** -- Side-effect-free operations should be Functions (GET), not Actions (POST).
7. **Open types without validation** -- Open types accept any property. Validate dynamic properties server-side.
## Reference Files
- `references/architecture.md` -- EDM, CSDL, entity/complex types, navigation properties, inheritance, URL structure, metadata
- `references/best-practices.md` -- Query composition, $apply aggregation, batch requests, functions/actions, deep insert, performance, versioning
- `references/diagnostics.md` -- Query syntax errors, $filter issues, $expand failures, batch errors, metadata problems, performance
## Cross-References
- `overview` skill -- OData vs REST/GraphQL comparisons
- `rest` skill -- REST design principles (OData builds on REST)
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!