-
Notifications
You must be signed in to change notification settings - Fork 115
Fixes #720 - Add support for SQLDatabase.$sqlendpoint parameter replacement #737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… tests Co-authored-by: shirasassoon <[email protected]>
|
@copilot Why is SQLDatabase item explicitly referenced in refresh_deployed_items where properties are extracted? |
Co-authored-by: shirasassoon <[email protected]>
SQLDatabase needs to be explicitly referenced in This is the same pattern used for Lakehouse and Warehouse items (lines 368-374) and Eventhouse items (lines 375-378). Fixed in commit 5881f0d by adding SQLDatabase to the property extraction list. |
shirasassoon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Review the comment and update documentation in parameterization to include this new variable support.
…tabase support Co-authored-by: shirasassoon <[email protected]>
Updated the parameterization documentation in commit 4c7c54d. The documentation now shows SQLDatabase as a supported item type for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for dynamic SQL Database endpoint replacement during deployment, enabling users to replace server endpoints (not just database GUIDs) when deploying semantic models with Fabric SQL Database sources across environments.
Changes:
- Added SQLDatabase to the property path attribute mapping with
sqlendpointmapped tobody/properties/serverFqdn - Extended property extraction logic to fetch SQL endpoints for SQLDatabase items from the Fabric API
- Updated documentation to reflect SQLDatabase as a supported item type for
$sqlendpointattribute - Added comprehensive test coverage for SQLDatabase sqlendpoint extraction
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/fabric_cicd/constants.py |
Added SQLDatabase entry to PROPERTY_PATH_ATTR_MAPPING with sqlendpoint mapped to serverFqdn property |
src/fabric_cicd/fabric_workspace.py |
Extended property extraction in _refresh_deployed_items to include SQLDatabase alongside Lakehouse and Warehouse |
docs/how_to/parameterization.md |
Updated dynamic replacement table to include SQLDatabase as supported item type for $sqlendpoint |
tests/test_parameter_utils.py |
Added mock SQLDatabase data and test cases for sqlendpoint extraction with both legacy and new syntax |
Description
Enables dynamic replacement of SQL Database server endpoints during deployment via
$items.SQLDatabase.DB_Name.$sqlendpointsyntax in parameter files.Problem: When deploying semantic models with Fabric SQL Database sources, only the database GUID could be replaced, not the server endpoint, breaking connections across environments.
Solution: Added SQLDatabase to
PROPERTY_PATH_ATTR_MAPPINGwithsqlendpointmapped tobody/properties/serverFqdn, and added SQLDatabase to the property extraction logic in_refresh_deployed_itemsto ensure the endpoint is fetched from deployed items.Changes
src/fabric_cicd/constants.py: Added SQLDatabase entry to property path mappingsrc/fabric_cicd/fabric_workspace.py: Added SQLDatabase to property extraction in_refresh_deployed_itemsmethod to fetch sqlendpoint values from the Fabric API. Simplified the property extraction logic by removing redundant type checks - the_get_item_attributemethod already validates attribute support.docs/how_to/parameterization.md: Updated documentation table in the "Dynamic Replacement" section to include SQLDatabase as a supported item type for the$sqlendpointattributetests/test_parameter_utils.py: Added test coverage for SQLDatabase sqlendpoint extractionUsage
The system will fetch the
serverFqdnproperty viaGET /v1/workspaces/{id}/sqldatabases/{id}and replace the find_value with the target database's endpoint.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.