Skip to main content

Manage Doris with NineData SQL Console

NineData SQL Console lets you connect to Doris, browse databases, execute SQL, inspect objects, and manage common data operations from a browser workspace.

Use this guide to add a Doris data source and open it in SQL Console. The page also summarizes the SQL Console controls that are useful when working with Doris.

Overview

SQL Console is part of NineData Database DevOps. For Doris, it provides a governed workspace for SQL execution, object browsing, execution history, saved SQL, AI-assisted SQL operations, and enterprise controls such as SQL standards and approval workflows.

ninedata

Before you begin

  • Register a NineData platform account. See Registering a NineData Account.

  • Under DevOps Enterprise (organization mode), you must have read-only, DML, or DDL permissions for the target data source.

    tip

    Read-only permissions only support viewing databases and querying data operations.

  • In the commercial versions (DevOps Pro, DevOps Enterprise), make sure your monthly or yearly subscription has not expired. An expired subscription may prevent you from using the Database DevOps service. Check the remaining quota and expiration date in the NineData Console header.

    check_quota

Key capabilities

NineData's SQL Console provides several convenient features to help you manage your data sources.

Feature
Description
AI IntelligenceNineData provides AI services for SQL statement generation, SQL query optimization, and troubleshooting.
  • SQL statement generation: Convert short natural language prompts into SQL query statements.
  • SQL query optimization: Provide the original SQL statement and optimization goal so AI can suggest improvements.
  • Problem solving: Ask questions about SQL, objects, or database operations.
AI Functions
  • SQL Optimize: AI analyzes the SQL statement at the cursor or the selected SQL statement and provides optimization suggestions.
  • AI Format: AI analyzes the structure of the selected SQL statement and performs formatting to enhance readability.
Execute SQL Statements
  • Access data in the data source.
  • Perform insert, delete, and update operations on databases, tables, and data (records) in the data source.
  • Create views in the data source.
  • Grant or revoke user permissions.
Note: In DevOps Enterprise (organization modeOrganization mode supports assigning different roles and resource management permissions to each user in the organization, suitable for collaborative development by multiple users within the same organization. It improves overall production efficiency while ensuring data security.), you need the appropriate permissions to perform the above operations on the data source.
Generate Creation ScriptsGenerate creation scripts for existing objects such as databases and tables in the data source. Use the scripts to recreate the same structure in other data sources.
SQL Intelligent SuggestionsAs you type SQL in SQL Console, NineData suggests keywords, functions, table names, column names, and other common objects based on the statement context. It also provides SQL templates and syntax help.
Save SQL | View SQLSave frequently used SQL statements in NineData and view them later. Saved SQL is stored in the cloud for reuse across browsers and hosts.
Workspace RecoveryIf the browser exits unexpectedly or crashes, sign in to the NineData console and reopen SQL Console. NineData restores the previously opened data source and SQL commands from the cloud.
Execution HistoryHistory records all the SQL statements executed by the current account in the NineData console. It also supports quick retrieval based on data sources, execution time, SQL keywords, etc. Quickly copy and execute SQL statements from the execution history in SQL Console.
SQL Standard Check (Enterprise Edition)In DevOps Enterprise (organization modeOrganization mode supports assigning different roles and resource management permissions to each user in the organization, suitable for collaborative development by multiple users within the same organization. It improves overall production efficiency while ensuring data security.), NineData checks every SQL statement executed in SQL Console based on the SQL development standards configured by Administrator. If a SQL statement does not comply with the standards, NineData blocks the execution to protect database security. After interception, users can revise the SQL and resubmit it, or submit a SQL task through the approval process configured by Administrator.

Procedure

Add a Doris data source

  1. Sign in to the NineData Console.

  2. On the left navigation pane, click Datasource > Datasource.

  3. Click the Datasource tab, then click Create Datasource. In the data-source type dialog, choose Database > Doris. Configure the fields on the Create Datasource page.

    tip

    If you make a mistake during the operation, click the arrow_down icon at the top of the Create Datasource page to make a new selection.

    Click to expand table details
    ParameterDescription
    NameEnter a meaningful data source name to identify and manage it later.
    ConnectionChoose the access method for the data source. Supports three methods: IP Address, Gateway, and SSH Tunnel.
    • IP Address: Access the data source through a public IP address.
    • Gateway: Use NineData gateway access for private-network connectivity. Connect the host where the data source resides first. See add gateway.
    • SSH Tunnel: Access the data source through an SSH tunnel.
    Configuration options for IP AddressHost: Enter the public connection address and port number of the data source.
    Configuration options for GatewayGateway: Choose the NineData gateway installed on the host where the data source resides.
    Host: Use localhost if the data source runs on the same host, or use the private IP address of the data source host.
    Configuration options for SSH Tunnel
    • SSH Host: Enter the public IP or domain name of the target data source's server, along with the corresponding port number (default port for SSH service is 22).
    • SSH Authentication Method: Choose the SSH authentication method.
      • Password: Connect using SSH Username (server login name) and Password (server login password).
      • Key (recommended): Connect using SSH Username and Key File.
        • SSH Username: Enter the login username of the target data source's server.
        • Key File: Upload the private key file by clicking Upload. This is the key file without an extension. If you haven't created it yet, see generate SSH Tunnel key file.
        • Password: Enter the passphrase set during key file generation. Leave it blank if no passphrase was set during key generation.
    • Note: After configuring SSH, click Connection Test on the right. Two outcomes are possible:
      • Connection Successfully: The SSH Tunnel is available.
      • Error message: The connection failed. Use the error message to troubleshoot and retry.
    DB AccountData source username.
    DB PasswordData source password.
    Access RegionChoose the region closest to the location of your data source to effectively reduce network latency.
    EnvironmentSelect the environment that matches the business purpose of this data source. Default options include PROD and DEV. Custom environments can also be created from Create custom environments.
    Note: In organization mode, database environments can also be used in permission policy management. For example, the default Prod Admin role can access only data sources in the PROD environment. See manage roles.
    EncryptionConfigure SSL encryption for the data source (default: on). If the data source requires SSL encryption, enable this option, or the connection fails.
    Use the switch to turn encryption on or off. Click the arrow next to Encryption to expand detailed configuration.
    • SSL Options: Choose one of two options:
      • If Available: Detect the server SSL status. If SSL is enabled on the server, connect with SSL. Otherwise, use a non-SSL connection.
      • Require: Always use SSL to connect to the data source. If the server does not support this method or cannot establish an SSL connection for other reasons, the connection fails.
    • SSL Cipher: Specify the SSL-Cipher encryption algorithm.
    • Verify Server Certificate (SSL CA): If the Doris server uses a self-signed CA certificate, upload the root certificate of that CA here.
    • Verify Server Identity (SSL Identify): Select this option to verify the server name and IP address so the connection reaches the genuine Doris server and helps prevent man-in-the-middle attacks.
    • Authenticate Client: If the Doris server requires a client certificate, upload the client certificate and key here. The Doris server verifies the uploaded information to secure the connection.
    Note: In most cases, if the Doris server supports SSL encrypted connections, select Require without configuring other options. NineData generates the connection keys. For more SSL configuration methods, see the official documentation: Configure Doris encrypted connections.
  4. Click Create Datasource. NineData adds the data source after the connection test succeeds. If the test fails, review the connection settings and try again.

Open Doris in SQL Console

  1. Sign in to the NineData Console.

  2. In the left navigation pane, click DevOps > SQL Console.

    tip

    If a data source session is still open, NineData redirects you to that data source page.

  3. Click the text box below SQL Console. In the data source list, select the target Doris data source, then click Query.

    tip

    If multiple data sources exist, enter keywords (partial or complete) in the box to perform an exact or fuzzy search. The searchable fields include:

    • Data source name
    • IP address
  4. The SQL Console opens for the Doris data source. Use it to run queries, inspect objects, edit data, and manage database operations permitted by your role.

    execute_sql_doris

  5. For detailed instructions, see SQL Console interface.

    tip

    In DevOps Enterprise (Organization Mode), if sensitive columns are configured in the target data source, complete column content remains hidden until sensitive column access permission is granted. sensitive_data

Result

The Doris data source is available in NineData SQL Console. Open it from the SQL workspace, run SQL operations within your permissions, use AI-assisted SQL features, and review execution history.

SQL Console interface

doris_interface

Number
Feature
Description
1SQL TabThe open SQL Console tab for a data source. Use tabs to switch between multiple SQL Consoles, and click X at the end of a tab to close that SQL Console. Right-click a tab to use these actions:
  • Instance Details: Open the details window for the current data source.
  • New Query: Open a new SQL Console for a data source.
  • Close Tab: Close the current tab.
2Open Data SourceSelect and open a new SQL Console for a data source.
3Data Source InformationContains data source information for the current SQL Console, including environment, IP address, and port number.
Right-click menu:
  • Instance Details: Open details for the current data source, including username, connection address, runtime, and connection count.
  • Refresh: Refresh the data source information.
4RefreshRefresh the data in the current data source.
5Database NameSelect the target database to perform SQL operations.
6Function Buttons
  • execute: Execute: Execute the selected SQL statement.
  • optimizedSQL: SQL Optimize: AI analyzes the SQL statement at the current cursor position and provides optimization suggestions.
  • setting02: Settings
    • Results: Choose Overwrite or Append.
      • Overwrite (default): The new result set replaces the previous execution result.
      • Append: Open a new tab for the new result set.
    • Theme: Change the SQL Console theme. Options are Light and Dark.
    • Font Size: Adjust the SQL editor font size by dragging the slider. Default values are as follows:
      • Windows: 16
      • MacOS: 13
  • more: More options
    • Format: Format the selected SQL statement for better readability.
    • AI Format: Use AI to adjust the structure of the selected SQL statement.
    • Execution Plan: View the execution plan of the selected SQL statement.
    • Save SQL: Save all SQL statements in the current SQL Console to the SQL list for future use.
    • View SQL: View saved SQL statements. Insert a saved SQL statement into the current SQL Console by using Insert. Edit (Edit) or delete (Delete) the target SQL.
    • History: View the execution history of SQL for the target data source. Filter execution history by time period or search by SQL statement, database name, or error message.
  • codefill: Editor: Switch to editor mode.
  • ai: AI Robot: Switch to Intelligent SQL mode. For more information, see Using AI to Manage Data Sources.
  • admin: Enable Admin Mode|Disable Admin Mode Only accessible by Administrator. When this mode is enabled, all SQL executed in SQL Console bypasses standards and approval processes and can be executed directly.
  • expend: Full Screen: Open SQL Console in full-screen mode based on the browser size. To restore the original size, click compress Exit.
7Search Table NameQuickly search for a target data table by entering the table name.
8Database ListLists all databases and data tables in the current data source.
  • Create Database: Right-click any database, click Create Database, enter Name, Character, and the corresponding Collation in the dialog, and click OK to create the database visually.
  • Database Details: Right-click the target database and click Database Details to open the Database Details page and view database details.
  • Select Rows: Right-click the target table and click Select Rows to query table data. Up to 100 rows are returned by default.
  • Table Details: Right-click the target table and click Table Details to open the Database Details page and view all Column and Indexes of the target table.
  • Select Rows: Right-click the target view and click Select Rows to query view data. Up to 100 rows are returned by default.
  • Generate DDL: Right-click the target object and click Generate DDL to generate the SQL statement for creating the object.
  • New Query: Right-click any object and click New Query to open a new SQL Console tab.
  • Refresh: Right-click any object and click Refresh to refresh the database list.
9SQL EditorSupports these features:
  • SQL execution: Execute a single statement or run statements in batches.
  • Interrupt execution: Click Stop to interrupt SQL execution.
  • Syntax highlighting: Uses different colors for different syntax elements to improve code readability.
  • SQL auto-completion: Provides suggestions based on the syntax as you type.
  • SQL syntax help: After entering a SQL keyword, select the keyword and right-click > Help to view the corresponding help information.
  • SQL templates: Provides common templates for CREATE, SELECT, INSERT, UPDATE, and DELETE statements. Enter the prefix command and select the corresponding template. For example, type CREATE to choose between CREATE TABLE and CREATE VIEW templates.
  • Right-click menu:
    • Execute: Execute the SQL statement at the cursor position.
    • Format: Format the selected SQL statement for better readability.
    • AI Format: Use AI to adjust the structure of the selected SQL statement for better readability.
    • SQL Optimize: Use AI to analyze the SQL statement at the cursor position and provide optimization suggestions.
    • General operations: Use Cut, Copy, Paste, and Select All.
    • Select Current SQL: Select the SQL statement at the cursor position.
    • Help: Use AI to analyze the selected content and provide information such as target SQL syntax semantics, target table structure, and the overall SQL logic.
10Execution Information, Result SetDisplays the execution information and result set of the SQL.
  • Execution Information: Includes execution time, executed SQL statement, execution status, and execution duration.
  • Result Set: Displays the result of the SQL. Depending on the data source type, these actions are available:
    • Click upload: Supports exporting data tables in multiple formats. Export the current page or all data (up to 10,000 rows).
    • Click togglebottom2: Scroll the result set to the bottom of the page. Click togglebottom1 to restore.
    • Click setting02: Use it to lock, hide, or show columns in the result set.
    • Result Set Search: Supports Fuzzy and Exact.
    • Click the small arrow next to the column name to sort the result set.
    • Copy Row: Right-click the target cell, select Copy Row to copy the entire row of data where the cell is located.
    • Copy Field: Right-click the target cell, select Copy Field to copy the current cell.
    • Copy as: Right-click the target cell, select Copy as to choose from multiple formats to copy the data in the row where the cell is located.
    • Export: Right-click any cell, select Export to export the current result set in multiple formats. Export the current page or all data (up to 10,000 rows).

Next steps