All Products
Search
Document Center

DataWorks:Personal directories

Last Updated:Aug 12, 2025

The personal directory is a private storage and development space for each developer to manage and debug code. You can create and maintain your personal code in this directory.

Personal directory description

Files in the personal directory are classified into two types: My files and local files. The following table describes these two file types.

Directory type

Storage directory

Storage provider

Storage path

Allows direct file operations from the terminal

My files

The default directory in the personal directory.

DataWorks

No

Local files

The default storage directory of a personal development environment instance.

If a dataset is specified for the personal development environment instance, the storage provider is the NAS service configured for the dataset.

Specified when you create the personal development environment instance.

Yes

If no dataset is specified for the personal development environment instance, the storage provider is DataWorks.

/mnt/workspace/.virtual_documents

Yes

If you do not use a personal development environment, you can add a path from your current device to the personal directory.

User's current device

The path you select when you add the on-premises folder.

No

File types

You can create files of any type in your personal directory. However, you can run only the following types of files:

  • .ipynb: Notebook file.

  • .sh: Shell file.

  • .py: Python file.

  • .sql: SQL file.

Note

You can read and write files in other programming languages that are supported by Visual Studio Code in the personal directory. However, syntax highlighting and development environments are not provided for these files, and you cannot run them.

Prerequisites

Go to the Personal Directory section

  1. Go to the Workspaces page in the DataWorks console. In the top navigation bar, select a desired region. Find the desired workspace and choose Shortcuts > Data Studio in the Actions column.

  2. In the navigation pane on the left of the DataStudio page, click the image icon to go to the Data Development page. In the directory tree on the left, click Personal Directory.

Add personal files

You can add personal files to different locations as needed.

Create a new personal file

In the Personal Directory, click My Files. In the toolbar, click the image icon to create a personal file in the My Files folder. When you create the file, specify a file extension to determine the file type. For more information about supported file types and their descriptions, see File types.

You can also click the image icon to create folders in My Files.

Add a local file

In addition to the default My Files folder, you can add an on-premises folder, including its files and code repositories, to your Personal Directory.

  • If you do not use a personal development environment, you can click the image icon in the toolbar to add a folder from your local device to the personal directory. Select the desired folder.

    This operation requires you to grant the browser permission to read local files.
  • If you use a personal development environment, you can click the image icon in the toolbar to add a folder from the personal development environment instance to the personal directory. Select the desired folder.

Edit personal files

After you add a personal file, you can click the file name to open the editor page and start editing the file content. For example, you can write an SQL statement in a .sql file as shown below:

SELECT * FROM dw_work WHERE work_title IS NOT NULL;

Use personal files

You can use personal files in the following ways:

  • For runnable file types, such as .sql and .py files, you can send the code to the computing resource that is attached to the workspace for execution.

  • All supported file types in the personal directory (.ipynb, .sh, .py, and .sql) can be submitted to the project directory. After submission, you can configure scheduling properties and publish the files to the production environment.

  • You can submit .py files in your personal directory as MaxCompute resources or functions for use in MaxCompute job development.

Method 1: Run in the personal directory

This method is suitable for daily development, testing, and temporary queries. For example, to test whether a small piece of code works as expected, you can create a temporary file in your personal directory and run the code.

  1. Configure debug parameters.

    • In your personal directory, find the Shell, Python, or SQL file that you want to run. Click the file to open it in the editor. In the Debug Configuration pane on the right, set the parameters for the task.

      Parameter

      Description

      Type

      Select the type of computing resource required to execute the file.

      Computing Resource

      Select a computing resource that is attached to the current workspace.

      Resource Group

      Select the resource group to use for executing the file.

    • Notebook files must run in a personal development environment. For more information, see Run a Notebook.

  2. Debug and run the code.

    On the editor page, click the image icon in the toolbar to run the task.

Method 2: Submit to the project directory to run

If code in your personal directory needs to be scheduled periodically in a production environment, you can submit it to the project directory. This lets you quickly create a scheduling node from the personal file and create an auto triggered task within the project directory workflow.

  1. Start the submission process.

    In your personal directory, find the file that you want to submit to the project directory and double-click the file name to open its editor page. In the toolbar at the top of the page, click the image icon to submit the file to the project directory.

  2. Configure submission parameters.

    Configuration

    Description

    Select Node Type

    Select the node type in the project directory to which you want to submit the personal file. Make sure that the current code matches the selected node type.

    Select The Path For The Node

    Select the storage path for the node in the project directory.

    Confirm The Node Name

    Confirm 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

DataStudio supports submitting .py files from your personal directory as MaxCompute resources or functions. This lets you use them in data development nodes.

  1. Start the submission process.

    In your personal directory, find the .py file that you want to submit. Double-click the file name to open its editor page. In the toolbar at the top of the page, click the drop-down arrow next to the image icon and select Submit As Function or Submit As Resource.

  2. Configure submission parameters.

    Configuration

    Description

    Type

    • If you select Submit As Function, the type defaults to MaxCompute Function.

    • If 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 create the directory manually in Resource Management, and then select it here.

    Submission Type

    • New: Create a new function or resource in the specified path of Resource Management. If you select this parameter, you must configure the Name of the resource or function.

    • Associate With Existing File: Select an existing resource or function to associate. If you select this parameter, you must configure the Existing Resource.

      • When you associate with an existing function, the Python code in the current .py file replaces the Code in the original function.

      • When you associate an existing resource, the current .py file replaces the File Content in the original resource.

  3. Click Confirm and follow the on-screen instructions to complete the process.

    • If you set Submission Type to New, the creation page for the corresponding resource or function appears.

    • If you set Submission Type to Associate With Existing File, the editor page for the existing function or resource appears.

    For more information about the configuration parameters for MaxCompute functions and resources, see MaxCompute resources and functions.

Manage personal files

You can manage all files in your personal directory using the right-click menu. For example, you can download, delete, or rename files.

For files in a personal development environment, you can also manage them through the terminal.

  • Open in Integrated Terminal

    In the local files directory, find the object file and right-click it. From the shortcut menu, select Open In Integrated Terminal. This action opens a terminal window and automatically navigates to the file's directory.

  • Add on-premises folder to personal directory

    In the local files directory, right-click the desired folder. From the shortcut menu, select Add On-premises Folder To Personal Directory.... This adds a folder from your development environment to the personal directory view in DataStudio.

  • Delete on-premises folder from personal directory

    In the local files directory, find the folder and right-click it. From the shortcut menu, select Delete On-premises Folder From Personal Directory.... This action removes the folder from the personal directory view but does not permanently delete it.

Appendix: Features of the personal directory interface

The following table describes the operations supported in the DataStudio personal directory.

Interface feature

Feature description

image

Add an on-premises folder to the personal directory.

  • If you do not use a personal development environment, you can click the image icon in the toolbar to add a folder from your local device to the personal directory. Select the desired folder.

    This operation requires you to grant the browser permission to read local files.
  • If you use a personal development environment, you can click the image icon in the toolbar to add a folder from the personal development environment instance to the personal directory. Select the desired folder.

image

Create a Notebook.

image

Create a file.

image

Create a folder.

image

Refresh.

image

Collapse folders.