Skip to content

Added TALXIS.CLI.DataVisualizer to convert model to DBML#5

Closed
metjuperry wants to merge 2 commits intoTALXIS:masterfrom
metjuperry:master
Closed

Added TALXIS.CLI.DataVisualizer to convert model to DBML#5
metjuperry wants to merge 2 commits intoTALXIS:masterfrom
metjuperry:master

Conversation

@metjuperry
Copy link
Copy Markdown
Member

This PR adds the ability to call

txc visualize

command, which can transform a solution model into dbml, sql or edmx. The input parameters of this can either be a zip file or a folder with declarations

Example:

txc visualize -input \"C:path/to/input/zip\" -output \"C:folder/path/to/output\" -target dbml

@TomProkop
Copy link
Copy Markdown
Member

Hey @metjuperry, thanks for the contribution! 🎉

We really liked the idea and have merged it in PR #7 with some restructuring:

  • Renamed to DataModelConverter and moved into the existing TALXIS.CLI.Data project
  • Command changed to txc data model convert to fit the CLI hierarchy
  • Added smart input resolution (project folder, declarations folder, or .zip)
  • Fixed a few bugs (null type handling, optionset lookup, Relationships dir guard)
  • Added integration tests

Closing this in favour of #7. Thanks again!

TomProkop added a commit that referenced this pull request Apr 26, 2026
Fixes for 6 Copilot review comments:
#1: NuGet property name — verified working (false positive, hyphens preserved)
#2-4: URL-encode OData $filter values using Uri.EscapeDataString, matching
      existing DataverseQueryService.BuildODataQueryPath pattern
#5: Guard Path.GetDirectoryName returning null for plain filenames in export
#6: Move try/finally to wrap Pack() call so temp ZIP is cleaned up on failure

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TomProkop added a commit that referenced this pull request Apr 29, 2026
…logging

Issue #2A: EntityJsonConverter auto-wraps OptionSetValue/Money/MultiSelect
- New overload JsonToEntity(entityLogicalName, json, metadata) accepts EntityMetadata
- ConvertJsonValue wraps int→OptionSetValue for picklist/status/state columns
- ConvertJsonValue wraps decimal→Money for money columns
- Bare GUID strings auto-wrapped as EntityReference for single-target lookups
- JSON arrays → OptionSetValueCollection for multi-select picklists
- OptionSetValueCollection serialized as JSON array in WriteAttribute
- Shared FetchEntityMetadataAsync helper (no duplication between services)
- Fresh metadata per operation (no cache — CLI mutates schema)

Issue #2B: OptionSet values surfaced in CLI
- EntityAttributeRecord gains OptionSetName + OptionValues fields
- entity describe now shows OptionSet column for picklist/status/state columns
- New 'entity optionset global describe <name>' command shows all values+labels
- IDataverseOptionSetService.DescribeGlobalOptionSetAsync added

Issue #3: MCP output path resolution logging
- RootsService warns when no workspace roots available from client

Issue #5: Post-action failure recovery instructions
- ComponentCreateCliCommand detects leftover .template.scripts/.template.temp dirs
- Appends recovery hints to failure message

Issue #6: Data tool descriptions updated
- bulk_create and record_create descriptions document auto-type-detection

Issue #7: sln add stdout surfaced on success
- AddProjectsToSlnPostActionProcessor logs stdout (catches 'already contains')

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TomProkop added a commit that referenced this pull request Apr 29, 2026
…logging

Issue #2A: EntityJsonConverter auto-wraps OptionSetValue/Money/MultiSelect
- New overload JsonToEntity(entityLogicalName, json, metadata) accepts EntityMetadata
- ConvertJsonValue wraps int→OptionSetValue for picklist/status/state columns
- ConvertJsonValue wraps decimal→Money for money columns
- Bare GUID strings auto-wrapped as EntityReference for single-target lookups
- JSON arrays → OptionSetValueCollection for multi-select picklists
- OptionSetValueCollection serialized as JSON array in WriteAttribute
- Shared FetchEntityMetadataAsync helper (no duplication between services)
- Fresh metadata per operation (no cache — CLI mutates schema)

Issue #2B: OptionSet values surfaced in CLI
- EntityAttributeRecord gains OptionSetName + OptionValues fields
- entity describe now shows OptionSet column for picklist/status/state columns
- New 'entity optionset global describe <name>' command shows all values+labels
- IDataverseOptionSetService.DescribeGlobalOptionSetAsync added

Issue #3: MCP output path resolution logging
- RootsService warns when no workspace roots available from client

Issue #5: Post-action failure recovery instructions
- ComponentCreateCliCommand detects leftover .template.scripts/.template.temp dirs
- Appends recovery hints to failure message

Issue #6: Data tool descriptions updated
- bulk_create and record_create descriptions document auto-type-detection

Issue #7: sln add stdout surfaced on success
- AddProjectsToSlnPostActionProcessor logs stdout (catches 'already contains')

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TomProkop added a commit that referenced this pull request Apr 29, 2026
…logging

Issue #2A: EntityJsonConverter auto-wraps OptionSetValue/Money/MultiSelect
- New overload JsonToEntity(entityLogicalName, json, metadata) accepts EntityMetadata
- ConvertJsonValue wraps int→OptionSetValue for picklist/status/state columns
- ConvertJsonValue wraps decimal→Money for money columns
- Bare GUID strings auto-wrapped as EntityReference for single-target lookups
- JSON arrays → OptionSetValueCollection for multi-select picklists
- OptionSetValueCollection serialized as JSON array in WriteAttribute
- Shared FetchEntityMetadataAsync helper (no duplication between services)
- Fresh metadata per operation (no cache — CLI mutates schema)

Issue #2B: OptionSet values surfaced in CLI
- EntityAttributeRecord gains OptionSetName + OptionValues fields
- entity describe now shows OptionSet column for picklist/status/state columns
- New 'entity optionset global describe <name>' command shows all values+labels
- IDataverseOptionSetService.DescribeGlobalOptionSetAsync added

Issue #3: MCP output path resolution logging
- RootsService warns when no workspace roots available from client

Issue #5: Post-action failure recovery instructions
- ComponentCreateCliCommand detects leftover .template.scripts/.template.temp dirs
- Appends recovery hints to failure message

Issue #6: Data tool descriptions updated
- bulk_create and record_create descriptions document auto-type-detection

Issue #7: sln add stdout surfaced on success
- AddProjectsToSlnPostActionProcessor logs stdout (catches 'already contains')

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TomProkop added a commit that referenced this pull request Apr 29, 2026
…logging

Issue #2A: EntityJsonConverter auto-wraps OptionSetValue/Money/MultiSelect
- New overload JsonToEntity(entityLogicalName, json, metadata) accepts EntityMetadata
- ConvertJsonValue wraps int→OptionSetValue for picklist/status/state columns
- ConvertJsonValue wraps decimal→Money for money columns
- Bare GUID strings auto-wrapped as EntityReference for single-target lookups
- JSON arrays → OptionSetValueCollection for multi-select picklists
- OptionSetValueCollection serialized as JSON array in WriteAttribute
- Shared FetchEntityMetadataAsync helper (no duplication between services)
- Fresh metadata per operation (no cache — CLI mutates schema)

Issue #2B: OptionSet values surfaced in CLI
- EntityAttributeRecord gains OptionSetName + OptionValues fields
- entity describe now shows OptionSet column for picklist/status/state columns
- New 'entity optionset global describe <name>' command shows all values+labels
- IDataverseOptionSetService.DescribeGlobalOptionSetAsync added

Issue #3: MCP output path resolution logging
- RootsService warns when no workspace roots available from client

Issue #5: Post-action failure recovery instructions
- ComponentCreateCliCommand detects leftover .template.scripts/.template.temp dirs
- Appends recovery hints to failure message

Issue #6: Data tool descriptions updated
- bulk_create and record_create descriptions document auto-type-detection

Issue #7: sln add stdout surfaced on success
- AddProjectsToSlnPostActionProcessor logs stdout (catches 'already contains')

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants