Manage notebook cells

更新时间: 2026-06-04 21:25:23

Notebook cells are the building blocks of a notebook. Each cell type — Markdown, SQL, or database SQL — supports different operations and management options.

Supported Markdown syntax

Markdown cells support basic and extended Markdown syntax.

The following syntax is not yet supported:

  • HTML

  • Definition Lists

  • Emoji

  • Highlight

  • Subscript

  • Superscript

Markdown cell

Use Markdown cells to add text content with standard Markdown syntax.

image

Area

Description

action bar

Select a Markdown cell to access the following action bar operations:

  • Switch cell: Change the cell type to Markdown, SQL, or database SQL.

  • Add cell: Add a new Markdown, SQL, or database SQL cell below the current one.

  • Copy cell: Create a copy of the current cell below it.

  • Move cell: Move the current cell up or down.

  • Delete cell: Delete the current cell.

editing area

Write notebook content in the editing area using Markdown syntax.

SQL cell

Use SQL cells to write and run SQL code for a compute engine.

image

Area

Description

action bar

Select an SQL cell to access the following action bar operations:

  • Run: Runs the SQL code in the cell.

  • Query Acceleration: Supported for MAXCOMPUTE_SQL cells. After you enable Query Acceleration, you must select an acceleration method.

    • Acceleration source: Accelerate queries using an acceleration source. This method requires selecting an acceleration source and a resource group.

      • Acceleration source: Select an acceleration source bound to the current project's compute source. If none is available, click Create Acceleration Source to create one.

      • Resource group (optional): Select a configured resource group under the selected acceleration source.

      Note
      • When using an acceleration source, ad hoc queries follow the syntax of the selected source type. Ensure your SQL statements comply. For example, a StarRocks acceleration source uses StarRocks syntax.

      • Using an acceleration source for queries does not create a temporary table for each query.

    • MCQA: MaxCompute Query Acceleration. Tenant-level limits on jobs and concurrent queries may cause acceleration failures or errors. Query Acceleration (MCQA). To disable MCQA, go to Management Center > System Settings > DataStudio > Query Acceleration.

    The available acceleration methods depend on the compute engine and scenario.

    If the current tenant uses a MaxCompute compute engine:

    • If Query Acceleration is not purchased but is enabled in DataStudio, the acceleration method is MCQA.

    • If Query Acceleration is purchased and enabled in DataStudio but the project's compute source is not bound to an acceleration source, the acceleration method is MCQA.

    • If Query Acceleration is purchased and the project's compute source is bound to an acceleration source, you can select either method.

  • Collapse cell: Collapse the cell's code area.

  • Format SQL: Format the SQL code in the cell.

  • Switch cell: Switch the SQL cell to a Markdown, SQL, or database SQL type.

  • Add cell: Add another cell below the current SQL cell, such as a Markdown cell, SQL cell, or database SQL cell.

  • Copy cell: Create a copy of the current SQL cell below it.

  • Move cell: Move the current SQL cell up or down.

  • Delete cell: Delete the current SQL cell.

editing area

You can write SQL code for the compute engine in the editing area.

Database SQL cell

Use database SQL cells to write and run SQL code against a data source.

image

Area

Description

action bar

Select a database SQL cell to access the following action bar operations:

  • Run: Run the SQL code in the current database SQL cell.

    Note

    By default, running a database SQL cell uses the default resource group configured in the selected data source, not the default resource group of the analysis project.

  • Collapse cell: Collapse the code area of the current database SQL cell.

  • Format SQL: Format the SQL code in the current database SQL cell.

  • Switch cell: Switch the database SQL cell to a Markdown, SQL, or database SQL type.

  • Add cell: Add a Markdown, SQL, or database SQL cell below the current one. .

  • Copy cell: Create a copy of the current database SQL cell below it.

  • Move cell: Move the current database SQL cell up or down.

  • Delete cell: Delete the current database SQL cell.

  • Select data source: Select a data source (including external data sources) to use for executing the SQL code.

  • catalog: You must select a catalog for Presto and Trino data sources.

  • database/schema: You must select a database or schema for the following data source types: MySQL, PostgreSQL, Hologres, AnalyticDB for PostgreSQL, OceanBase (Oracle tenant mode), Lindorm, Oracle, ClickHouse, DM, openGauss, StarRocks, Doris, SelectDB, Presto, GaussDB (DWS), Trino, PolarDB-X 2.0, and OushuDB.

editing area

You can write database SQL code in the editing area.

When you click Run, the system verifies your permissions for all referenced objects. If any check fails, a dialog box lists the objects you lack access to.

The dialog box displays the following details:

  • Object Name: The name of the object for which you lack permission.

  • Object Type: Table or global variable.

  • Permission Type: The permission required to run the script. For example, tables require data query permission, while data sources require execute permission.

  • Operation: Apply for the required permissions.

    • Single object: Click the image.png icon in the Operation column to apply for permissions. The default validity period is 30 days.

    • Multiple objects: Select the target objects or click Select All Tables, then click Apply for Permissions.

    Apply for permissions. After permissions are granted, run the code again.

    Note

    Only MySQL and Oracle data sources support table-level permission control.

上一篇: Create a notebook 下一篇: Create manual tables based on the analysis platform
阿里云首页 智能数据建设与治理 Dataphin 相关技术圈