9.5.4.1.1.4 Notebook
Note:
The Username is case sensitive. Ensure you use the correct case for the username when accessing and executing the notebook.Navigate to Notebook page to view the paragraphs. You can run, invalidate session, edit, add, export the notebook, and so on.
Figure 9-77 Notebook page

Note:
The following features on Notebook are not supported in the current release.- Cloning the notebook
- Sharing the notebook
- Versioning the notebook
- Modifying the notebook
- Deleting the notebook
- Attaching credentials to the notebook
- Entering dependency modes to the notebook
Inject Private Credential
- A new button to inject private credentials is introduced in the Notebook tab of Pipeline Designer.
- Two types of variables are supported: Environment Variables and Data Source Connection Variable.
- Option to upload the
.env
file is provided.
In MMG, users can securely store their private credentials (such as database usernames and passwords) within their Python runtime session using Datasource Connection User variable types to connect to data sources. Additionally, support for environment variables has been provided. Both types of variables are scoped to the current Notebook session. Once the session is invalidated, these variables are lost, and the user will need to re-upload them.
The session of the variables is controlled by the property session-mode of Studio. If set
as NOTEBOOK_USER --> the variables are only set for the Notebook session if NOTEBOOK -->
shared across users, for example, if user A sets the credentials, User B will also be
able to execute with the same. Users can upload a {{.env}}
file that
contains environment variables.
When uploaded, the variables are automatically assigned the environment variable type. To use the Datasource Connection User type, the user must manually update the type after upload.
- Retrieve "environment variables" using the
{{mmgsm.get_secret()}}
function. - Access "database connections" using the
{{mmg.workspace.get_conn()}}
method.
{{mmgsm.get_secret(key)}}
function is used to retrieve the value of
environment variables (but not database user credentials). Users also have the option to
add, modify, or remove secrets through the Set Private Credentials UI.
Note:
To enable this feature, the 81275 patch needs to be applied.