Skip to content

feat(job): support semanticModel job run / start / run-status commands#2

Draft
may-hartov wants to merge 7 commits intomainfrom
dev/mahartov/refresh_semantic_model_job
Draft

feat(job): support semanticModel job run / start / run-status commands#2
may-hartov wants to merge 7 commits intomainfrom
dev/mahartov/refresh_semantic_model_job

Conversation

@may-hartov
Copy link
Owner

This pull request introduces support for running and monitoring Power BI semantic model refresh as jobs in the CLI.

It adds new API client methods, job type definitions, error handling, and command logic to enable semantic model refresh as a distinct job type, with proper status polling, cancellation, and parameter validation. The changes also ensure that unsupported operations for semantic models are explicitly blocked and surfaced to the user.

P0 support:

  • Job run and start - block -i and -P input, refresh dataset with default request payload { retryCount: 1}. This is to avoid breaking changes when Fabric Jobs REST API will support semanticModel refresh
  • Job run-status - created a mapping between refresh dataset Get execution details response to Get Job instance output for unity.

Semantic Model Refresh Job Support:

  • Added new API client (fab_api_semantic_model.py) with methods to trigger, monitor, and cancel semantic model refreshes via Power BI REST API.
  • Introduced FabricJobType.SEMANTIC_MODEL_REFRESH and mapped it to the ItemType.SEMANTIC_MODEL in the job type mapping. [1] [2]
  • Updated job execution (fab_jobs_run.py) and status (fab_jobs_run_status.py) commands to handle semantic model refresh jobs separately, including custom payloads, status transformation, and cancellation logic. [1] [2] [3] [4]

Parameter Validation and Error Handling:

  • Blocked use of unsupported parameters (-P/--params, -i/--input) for semantic model refresh jobs and surfaced clear error messages. [1] [2]
  • Added new error messages and error class for job-related errors, including missing refresh IDs and unsupported parameters. [1] [2] [3]

Job Polling and Status Logic:

  • Enhanced job polling utility to support semantic model refresh jobs, including custom status extraction, polling, and completion/failure handling. [1] [2] [3]
  • Added transformation logic to map semantic model refresh status responses to the standard job instance format for consistent CLI output.

Command Configuration and Restrictions:

  • Updated command support configuration to mark certain job subcommands (e.g., run_cancel, run_list, run_update) as unsupported for semantic models, preventing accidental misuse.

Minor Improvements:

  • Improved merging of configuration parameters for jobs, clarified comments, and refactored code for clarity and maintainability.

These changes collectively enable semantic model refresh as a robust, well-integrated job type in the CLI, with user-friendly error handling and clear operational boundaries.

@may-hartov may-hartov changed the title feat(job) - support semanticModel job run / start / run-status commands feat(job): support semanticModel job run / start / run-status commands Feb 17, 2026
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.

1 participant

Comments