feat(output format): Add api response in the result for JSON format - create command - #87
Merged
aviatco merged 21 commits intoDec 24, 2025
Conversation
added 9 commits
December 8, 2025 13:19
aviatco
marked this pull request as ready for review
December 9, 2025 14:14
added 2 commits
December 9, 2025 15:51
Co-authored-by: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com>
Alon Yeshurun (ayeshurun)
previously approved these changes
Dec 22, 2025
Alon Yeshurun (ayeshurun)
left a comment
Collaborator
There was a problem hiding this comment.
Consider adding docstrings for better readability and clarity
added 2 commits
December 23, 2025 10:54
…ithub.com/aviatco/fabric-cli into dev/aviatcohen/setApiResponseInJsonFormat
Alon Yeshurun (ayeshurun)
previously approved these changes
Dec 23, 2025
Alon Yeshurun (ayeshurun)
left a comment
Collaborator
There was a problem hiding this comment.
Minor suggestion.
Alon Yeshurun (ayeshurun)
approved these changes
Dec 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📥 Pull Request
✨ Description of new changes
Update create command Output Format and Add Batch output processing
Overview
Enhanced the create command output format to include API response data and implemented batch output for operations that create multiple items in a single command execution.
Key Changes
Updated print_output_format calls: Modified all mkdir command implementations to include API response data in the output
Added show_headers=True: Enabled structured table headers for better readability
Consistent data inclusion: All mkdir operations now return the complete API response alongside success messages
Files Modified:
Batch collection mechanism: Added output_batch tracking system for operations creating multiple items
Consolidated output: Multiple related item creations now produce unified output instead of separate messages
Dependency handling: Automatic dependencies (like EventHouse for KQL Database) are batched together
Key Implementation Details:
Consolidated messaging: Multiple items show as 'item1.Type' and 'item2.Type' created
API response inclusion: Full API response data now included in output for debugging/automation
Table formatting: Structured headers show item properties (id, type, displayName, workspaceId)
JSON/Text format support: Both output formats include the enhanced data structure
Benefits
For Users
Better visibility: Users can see complete API response data including IDs, types, and metadata
Cleaner output: Related operations (like KQL Database + EventHouse) show consolidated results
Structured information: Table headers make it easier to understand response data
For Automation
Rich data access: Scripts can access full API response data for further processing
Consistent format: Standardized output structure across all mkdir operations
Batch awareness: Automated tools can detect when multiple items were created together
Testing
Comprehensive test coverage: Tests verify both single item and batch creation scenarios
Output validation: Tests confirm proper headers, data inclusion, and message formatting
Format compatibility: Both JSON and text output formats tested with new structure
Example Output Changes
Before:
After (Text format):
id type displayName workspaceId
12345678-1234-1234-1234-123456789012 Lakehouse MyLakehouse abcd-efgh-ijkl
Batch Example (KQL Database with auto EventHouse):
id type displayName workspaceId
87654321-4321-4321-4321-876543210987 Eventhouse MyDatabase_auto abcd-efgh-ijkl
12345678-1234-1234-1234-123456789012 KQLDatabase MyDatabase abcd-efgh-ijkl
This enhancement provides richer output information while maintaining backward compatibility and improving the user experience for both interactive use and automation scenarios.