Forum Discussion
Change default Lakehouse with notebookutils
- 2 years ago
Yeah I understand what you're saying but once you've configured it once it's not a problem, just have to remember to do it on the first time you add the notebook to the 'prod' workspace.
It's just a flat json file stored in OneLake so any config settings I need are hidden away from users. I just use the below to get the name of the current notebook which will map to one of the elements in the file.nb_name = mssparkutils.runtime.context['currentNotebookName']
Thank you for the comment. I have played with deploymen pipelines as well but I did not like that I have to specifiy the deplyoment rule for each notebook.
Regarding the config file: Is this something fabric specific? Or do you just have a flat file with the information stored on onelake?
Yeah I understand what you're saying but once you've configured it once it's not a problem, just have to remember to do it on the first time you add the notebook to the 'prod' workspace.
It's just a flat json file stored in OneLake so any config settings I need are hidden away from users. I just use the below to get the name of the current notebook which will map to one of the elements in the file.