-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
area:cliCLI commands and UXCLI commands and UXarea:dataData import/export/migrationData import/export/migrationenhancementNew feature or requestNew feature or requestpriority:mediumMedium priorityMedium priority
Description
Problem
No CLI way to add filters during schema generation. Users must manually edit the generated XML and use the awkward HTML-encoded format:
<filter><filter type="and"><condition attribute="country" operator="eq" value="US"/></filter></filter>Proposed Solution
Add --filter option using SQL-like syntax (matches existing update/delete commands):
ppds data schema -e account,contact -o schema.xml \
--filter "account:statecode eq 0" \
--filter "contact:createdon gt 2024-01-01"The filter expression uses the same syntax as ppds data update --filter and ppds data delete --filter, leveraging the existing SqlToFetchXmlTranspiler.
Implementation
| File | Change |
|---|---|
src/PPDS.Cli/Commands/Data/SchemaCommand.cs |
Add --filter option (repeatable, format: entity:expression) |
src/PPDS.Migration/Schema/SchemaGeneratorOptions.cs |
Add EntityFilters dictionary property |
src/PPDS.Migration/Schema/DataverseSchemaGenerator.cs |
Apply filters to generated EntitySchema objects |
tests/PPDS.LiveTests/Cli/DataSchemaCommandE2ETests.cs |
Add filter tests |
Validation
- Error if
--filter "foo:..."butfoonot in--entitieslist - Validate filter syntax before writing schema
Related
- CmtSchemaReader doesn't support nested XML filter format #500 - CmtSchemaReader XML format bug (the HTML-encoded format workaround)
- Add filter feedback during data export #501 - Filter feedback during export
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:cliCLI commands and UXCLI commands and UXarea:dataData import/export/migrationData import/export/migrationenhancementNew feature or requestNew feature or requestpriority:mediumMedium priorityMedium priority
Projects
Status
Todo