The personal directory is a private space for you to manage and debug your code. You can create and maintain your personal code in this directory and share files with other workspaces or users.
Feature overview
Files in the personal directory are organized into three categories: My Files, Shared Files, and Local Files. The following table describes these categories.
Directory type | Display name | Storage directory | Storage provider | Storage path | Terminal access |
My Files | Show My Nodes Only | The default directory in the personal directory. | DataWorks | / | No |
Shared Files | Shared files (read-only) | Personal files shared with you by other users. You can view these files but cannot edit them. | DataWorks | / | No |
Local Files Note This directory does not exist by default. You must manually add local files. | Dataset mount path name | When you use a personal development environment, this is the default storage directory for the environment instance. | When a dataset is specified for the personal development environment instance, the storage provider is the NAS or OSS service configured for the dataset. | Specified when you create a personal development environment instance. | Yes |
workspace | When no dataset is specified for the personal development environment instance, the storage provider is DataWorks. |
| Yes | ||
Local folder name | When you are not using a personal development environment, you can add a path from your local device to the personal directory. | Your local device | The actual path selected when you add the local folder. | No |
File downloads under My Files may be governed by Security Center. A tenant administrator or tenant security administrator can configure whether to allow file downloads in the personal environment settings of Security Center. After download approval is enabled, each download request must be approved before you can download files in Upload and Download.
Go to the personal directory
Go to the Workspaces page in the DataWorks console. In the top navigation bar, select a desired region. Find the desired workspace and choose in the Actions column.
In the left-side navigation pane of the Data Studio page, click the
icon to go to the data development page. Then, click Personal Directory in the left-side directory tree to open the personal directory.
Manage personal files
You can choose where and how to add personal files as needed.
Create a personal file
In Personal Directory, click Show My Nodes Only. In the toolbar, click the icon to quickly create a personal SQL file under My Files. The following four file types are provided by default and can be run directly:
.sql: SQL file..ipynb: Notebook file..py: Python file..sh: Shell file.
Click Show My Nodes Only. In the toolbar, click the icon to quickly create personal files in more formats under My Files. When you create a file, you must specify a file extension to determine the file type.
There are no restrictions on the file types you can create in the personal directory, but only the file types listed above can be run.
The personal directory supports reading and writing file types of other programming languages supported by
Visual Studio Code, but does not provide syntax suggestions, development environments, or runtime support for these files.
Add local files
In addition to the default Show My Nodes Only directory provided by the personal directory, you can add local folders (including files and code repositories within the folders) directly to Personal Directory for management.
Method 1: In the toolbar, click the
icon to add a local folder to the personal directory, and select the target folder as needed.ImportantWhen the personal development environment is not enabled, "local" refers to your local device, and this operation requires you to grant the browser permissions to read local files. When the personal development environment is enabled, "local" refers to the personal development environment instance.
Method 2: You can also right-click in the local files directory and select Add On-premises Folder from the context menu.
If a file is no longer needed, right-click the target file and select Delete from the context menu. This operation removes the file from the personal directory but does not permanently delete it.
Locate files
The personal directory provides multiple quick file location features to help you easily find and locate the files you need, improving search efficiency and enabling more efficient data management and development.
1. Locate the currently open workflow or node Click the | 2. Quickly navigate to a folder in the terminal In the local files directory under the personal development environment, right-click the target folder and select Open in Integrated Terminal from the context menu. This opens a terminal window and automatically navigates to the folder path. |
3. Search for nodes In the search box of DataStudio (above Project Directory), search for a specific file by file name. A maximum of 2,048 search results can be displayed. | 4. Search for nodes by code snippet Click the |
Use personal files
You can use personal files as described below:
Among the file types that can be run in the personal directory,
.sqlfiles and.pyfiles can be configured to run on compute resources associated with the workspace.The file types supported in the personal directory (
.ipynb,.sh,.py,.sql) can be submitted to the project directory for execution, and schedule settings can be configured to deploy them to the production environment..pyfiles in the personal directory can be submitted as MaxCompute resources or functions for use in MaxCompute job development.
Method 1: Run in the personal directory
This method is suitable for routine development, testing, and ad hoc queries. During development, if you need to test whether a small piece of code logic works as expected, you can create a temporary file in the personal directory to test the code.
Configure debug parameters
In the personal directory, find the
Shell,Python, orSQLfile you want to run, and click it to open the editing page. In the Run Configuration panel on the right side, configure the task run parameters.Parameter
Description
Type
Select the compute resource type required to run the file.
Compute Resource
Select a compute resource that is associated with the current workspace.
Resource Group
Select the resource group to use for running the file.
Notebook files must be run in a personal development environment. For more information, see Run Notebook files.
Debug and run code
On the file details page, click the
button in the toolbar to quickly run the task.
Method 2: Submit to the project directory for execution
If the code in your personal directory needs to be periodically scheduled and run in the production environment, you can use the submit to project directory feature to quickly create a scheduled node based on the personal file. You can then follow the project directory workflow to create a scheduled task and complete subsequent development operations.
Start the submission process
In the personal directory, find the file you want to submit to the project directory, and double-click the file name to open the file details. In the toolbar at the top of the file, click the
button to submit the file to the project directory.Configure submission parameters
Configuration
Description
Type
Select the node type in the project directory to which the personal file will be submitted. The system selects the node type that matches the current file type by default.
SQL file: Submitted as MaxCompute SQL by default.
Notebook file: Submitted as a Notebook node by default.
Python file: Submitted as a Python node by default.
Shell file: Submitted as a Shell node by default.
Path
Select the storage path for the node in the project directory.
Name
Specify whether to use the personal file name as the node name, or define a new node name.
Method 3: Submit a Python file as a resource or function
Data Studio allows you to submit .py files in the personal directory as MaxCompute resources or functions for use in data development nodes.
Start the submission process
In the personal directory, find the
.pyfile you want to submit to the project directory, and double-click the file name to open the file details. In the toolbar at the top of the file, click the drop-down menu next to the
button, and select Submit as Function or Submit as Resource.Configure submission parameters
Configuration
Description
Type
When you select Submit as Function, the type defaults to
MaxCompute Function.When you select Submit as Resource, the type defaults to
MaxCompute Python.
Path
Select the path for the resource or function in Resource Management. The default path is
/, which indicates the root directory of resource management. To change the path, first manually create a directory in resource management, and then select it here.Submission Type
Create: Create a new function or resource under the specified path in resource management. When you select this option, you need to configure the resource or function Name.
Associate With Existing File: Associate with an existing resource or function. When you select this option, you need to configure the Existing Resource.
When you associate with an existing function, the Python code in the current
.pyfile replaces the Code in the original function.When you associate with an existing resource, the current
.pyfile replaces the Document Content of the original resource.
Click Confirm and follow the on-screen instructions to complete the subsequent operations.
If Submission Type is set to Create, you are redirected to the creation page for the corresponding resource or function.
If Submission Type is set to Associate With Existing File, you are redirected to the editing page for the existing function or resource.
For more information about the configuration parameters of MaxCompute functions and resources, see Configure MaxCompute functions and resources.
icon next to Personal Directory to quickly locate the file currently open in the right-side panel within the project directory.
icon next to Personal Directory to search for nodes that contain a specific code snippet. For more information, see