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, Restart session, edit, add, export the notebook, and so on.
Figure 11-91 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
Steps to enable two or more users to access the same Notebook with distinct sets of permissions
To enable two or more users to access the same notebook with distinct sets of permissions, follow these steps:
- Create a New Role in Data Studio
Log in to MMG with a user account that has DSUSRGRP (Data Studio User) access:
- Navigate to Data Studio Options > Permissions and switch to the Roles tab. # Click Create Entity and create a new role (For example, DSREADONLY). Assign the desired permissions, such as:
- View Code
- View Notebook
- View Sessions
- View Result
- View Paragraph for Read-Only access to Data Studio Notebooks.
- Create a Corresponding User Group.
Navigate to your Identity Management page and create a new user group with the same name as the role created in Data Studio. For example, DSREADONLY.
- Update Application Configuration.
To validate the new user group, update the
application.yml
file:- Navigate to
mmg-studio/conf/application.yml. #
- Under studio-server.security, append the newly created role to the validRoles field, separated by commas (For example, validRoles{*}: "MDLUSR,MDLREV,MDLAPPR,MDLBATCHUSR,DSUSRGRP,DSREDACTGRP,MDLVIEW,DSREADONLY").
- Navigate to
- Restart Data Studio.
Restart Data Studio using the following commands:
- # ./shutdown.sh
- # ./startup.sh
- Map the New User Group to a User.
Navigate back to the Identity Management screen and map the newly created user group (DSREADONLY) to the user(s) you want to grant these permissions.
Markers for track output and link types from Notebook and syncing up with Canvas
Markers for track output and link types from notebook and syncing up with canvas Using specific key words like "##track output##", there should be an option to provide these key words from the notebook paragraph and sync up with the pipeline. User will not have to use canvas interface here. This has to be done for output tracking and link types to determine execution paths (training,scoring,experimentation).
These are only applicable for draft and 'PARAGRAPH type nodes:- ##track_output## - For paragraph output tracking
- ##training## - For training nodes
- ##scoring## - For scoring nodes ##Experimentation
- ## - For Experimentation nodes
If the marker "##track_output##" is added in the Notebook paragraph, the canvas will automatically be synced up with this and corresponding node output will be tracked. If the marker is removed, the output tracking will be set to off.
On execution, if any of the nodes are associated with a path, the paths added on the links will not be considered for the execution. There is also an option to choose these path types from the node basic details window.
Access Module for File/Folder Operations
The OFS MMG Access feature provides utility functions where code can be used with OFS MMG workspaces and the file system within the OFS MMG Studio to perfrom file/folder related operations.
It is assumed that the module has already been imported by using one of the following codes:
from mmg.access import
or
import mmg.access as mac
Note:
The workspace attachment step must be performed before using any of the following
API mentioned in this section. The current working directory will always be the
path inside the FTPSHARE
of the attached workspace. For
example, <FTPSHARE_PATH>/mmg/<WS>
If the source and the destination starts with /
, then it is
assumed to be an absolute path (as is the case with os
and
shutil
. Hence, to maintain the compatibility, the same is
the case with the OFS MMG access feature module APIs
Table 11-20 List of APIs
Name | Description | Usage Example | Note |
---|---|---|---|
getcwd |
Returns the current working directory path within MMG
FTPSHARE for the active workspace.
|
getcwd() |
The getcwd() function returns the path inside
the attached workspace that is within FTPSHARE . It
does not reflect the actual cwd path that is
returned from the os.getcwd() function. Hence,
using os.chdir() will not affect the
getcwd() function implemented from the OFS MMG
access module library.
|
move |
Moves a file or directory to another location. | move(src='/source/path',
dst='/destination/path') |
|
copy |
Copies a file with metadata from one location to another. | copy(src='/source/path',
dst='/destination/path') |
|
copyfile |
Copies a file without its' metadata. | copyfile(src='/source/file',
dst='/destination/file') |
|
copytree |
Recursively copies a directory tree to the destination. | copytree(src='/source/dir', dst='/destination/dir',
dirs_exist_ok=True) |
|
listdir |
Lists all files in the specified directory. | listdir(path='/your/dir') |
|
remove |
Removes a single file from the specified path. | remove(path='/file/to/remove') |
|
rename |
Renames a file within the current workspace. | rename(src='/old/filename',
dst='/new/filename') |