Forum Discussion
Git Integration Best Practices
- 9 months ago
svenchio Thank you for your response. The only deviation I have is when it comes to defining the default lakehouse. We are going to have hundreds of notebooks, and defining a delpoyment rule for each one seems very tedious. What I am thinking of doing, is not connecting to any lakehouse via the UI. I would then use the %%config block and define my default lakehouse using a variable library.
Thanks again for your response. I've referenced some of your posts and videos before and they have been helpful.
Hi ABMN ,
I think one approach is to use Variable library and %%configure as you suggested with few adjusment.
you main workspace which connected to main branch will use the default value set. (main)
each time a developer is branching out, the developer will need to add a new value-set adding the correct id and set this value-set as active for this workspace.
When the PR was made from feature branch to main branch - use a fabric-cicd tool https://microsoft.github.io/fabric-cicd/0.1.30/ to deploy to main workspace, this will ensure that main workspace notebooks keep pointing to same lakehouse in main and not to feature workspace.
once the deployment using the fabric-cicd tool is complete, call the commit-to-git api, https://learn.microsoft.com/en-us/rest/api/fabric/core/git/commit-to-git?tabs=HTTP to commit the changes into the main branch.