Skip to main content

Data export

NineData Data Export lets you export data, table schema, or both from a connected data source to your local computer for analysis, backup, processing, or migration.

Overview

Organizations often need complete and accurate database extracts for reporting, analysis, backup, and migration. NineData Data Export provides these capabilities:

Use cases

  • Backup and migration: Export data to a local computer for backup or migration to another platform.
  • Analysis and reporting: Export data in a format that downstream analysis or reporting tools can use.
  • Data processing: Export data for offline processing or controlled sharing.

Before you begin

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. You can check the remaining quota and expiration date in the NineData Console header.

check_quota

Usage restrictions

  • After the data export task status changes to Approved, execute the task within 24 hours. Otherwise, the task expires and you must submit the request again.
  • After the data export task status changes to Success, download the data file within 24 hours. The download link also expires after 10 downloads. After the link expires, submit the request again.

Create a data export task

Before you begin

You have permission to access the target data source. If you do not have permission, apply for it first. See Permission application and approval.

Procedure

  1. Sign in to the NineData Console.

  2. Go to DevOps > Data Export.

  3. On the Data Export page, click Create Export in the toolbar.

  4. On the Create Export page, configure the settings in the table.

    Parameter
    Description
    NameEnter a data export task name. Use a meaningful name so the task is easy to find later. Up to 64 characters are supported.
    Datasource/DatabaseSelect the data source and database that contain the table to export.
    Note: If you do not have permission for the data source or database, a message appears on the page. Click Apply Permission in the message to apply for permission. See Permission application and approval.
    Export MethodSelect the export method. Two methods are supported:
    • SQL Statement (ClickHouse, MongoDB, and Redis support only this option): Export data based on the SQL statement you provide. For example, SELECT * FROM employees exports all data in the employees table.
    • DB/Table: Export all tables in the current database or specific selected tables.
    Export ObjectsRequired when Export Method is DB/Table:
    • All Tables: Export all tables in the target database.
    • Customize: Manually select tables to export. After you select this option, click Add to select tables. Select specific fields or enter filter conditions.
    Export ContentSelect the export content: Data, Schema, or Schema + Data.
    • Data: Export table data, including field names but not field attributes.
    • Schema: Export the target table structure only.
    • Schema + Data: Export both table structure and data.
    Export TypeSelect the export file format:
    • SQL: Contains statements used to create and insert database objects. Use this format when migrating table structure or data to another data source.
    • CSV: A text file format in which fields are separated by commas. This option is available only when Export Content is Data.
    • EXCEL (fixed for Redis): A spreadsheet format suitable for reporting, statistics, and analysis. This option is available only when Export Content is Data.
    • JSON: Applicable only to MongoDB export.
    File EncodingChoose the encoding used when exporting data. Supports UTF-8 and GBK.
    Export ReasonEnter the export reason. This parameter is required in organization mode when an approval process is used.
    ExecutorSelect the user who executes the task after the export task is approved. This parameter is required only in organization mode.
    Note: The options in the Executor list depend on two conditions:
    • If the current data source has configured development standards, the options are based on the Export Executor Config rule in the current standards. This rule is located on the SQL Task & Console tab. For configuration details, see Edit policy.
    • If the current data source has not configured development standards, the options are users who have the Data Export - Exec permission for the current data source. For permission details, see Configure user permissions.
    Advanced
    • Export Big Key (optional only when Export Content contains Data): Choose whether to export large fields. The large-field type varies by data source type.
    • SQL Script Extensions:
      • Generate DROP statement before CREATE (optional only when Export Content is Schema + Data): Generate a DROP statement before the CREATE statement for each table. If a table with the same name already exists during import, the table is deleted and re-created to avoid name conflicts.
      • Generate TRUNCATE statement before INSERT (optional only when Export Content contains Data): Generate a TRUNCATE statement before importing data into each table to avoid duplicate data insertion.
      • Compress Insert Statement (optional only when Export Content contains Data): Compress multiple INSERT statements into a larger INSERT statement when generating the SQL script to improve insert efficiency.
    • Other Objects (optional only when Export Content contains Schema): Choose whether to export non-table objects. They are not exported by default.
  1. Click Create Export. The console opens the Details page.

  2. In the Pre-check node, wait until the task status changes to Pending. Then click Submit Approval in the toolbar to enter the Submit Approval node. In the Pre-check node, these actions are available:

    • Click the refresh icon in the toolbar to refresh the task status.

    • Click Check Again in the toolbar to run the check again.

    • Click Withdraw in the toolbar to withdraw the task, or edit and submit it again.

    • Click Duplicate in the toolbar to copy a new task with the same configuration.

      tip
      • Pre-check checks the export task, including SQL syntax in SQL Statement export scenarios, estimated rows, and database permissions. If issues are found, NineData displays details to help you update the task.
      • If no approval process is configured for the data source, the task skips Pre-check and Submit Approval, enters the Execute Task node, and changes to Approved. Then go to Step 9.
  3. Click Submit Approval in the toolbar, select the approvers in the dialog, and click OK.

    tip
    • The number of approvers depends on the approval process configuration.
    • If the Not Specifying Approvers feature is enabled in the current approval process, this section displays After submission, all approvers can review. Please check the results in the approval process.. You can submit the work order without manually specifying an approver. All users authorized to approve the current work order receive approval notifications and can approve it.

  4. The task status changes to Pending Approval. Before approval, use these actions:

    • Click the refresh icon in the toolbar to refresh the task status.
    • Click Withdraw in the toolbar to withdraw the task, or edit and submit it again.
    • Click Transfer in the toolbar to change the approver of the task.
    • Click Duplicate in the toolbar to copy a new task with the same configuration.
  5. After the task status changes to Approved, click Execute in the toolbar, select Execution Method, and click OK.

    • Execute Now: Execute the data export task immediately.

    • Scheduled Execution: Schedule the data export task for a specific time.

      caution

      The selected execution time must be within 24 hours. Otherwise, the task cannot run and you must submit the request again.

  6. After the task status changes to Success, click Download in the toolbar to download the data file to your local machine.

    caution

    Download the file within 24 hours. The download link also expires after 10 downloads. After the link expires, submit the request again.

Result

The export task finishes, and the exported file is downloaded to your local machine. In organization mode, the task also preserves the approval and execution record for audit purposes.

Approve a data export task

Before you begin

  • You have created or joined an organization. See Manage organizations.
  • The NineData console is in organization mode. To switch from personal mode to organization mode, see Switch to organization.
  • The status of the data export task is Pending Approval.
  • You are the Administrator or the Approver of the target data export task.

Procedure

  1. Sign in to the NineData Console.

  2. Go to DevOps > Data Export.

  3. On the Data Export page, find the target task, and click the task ID or Details in the Actions column.

    tip

    Alternatively, hover over the notification icon at the top of the page and click the target task in the Todo tab.

  4. On the Details page, review the approval request and select the action that matches your decision: Transfer, Approved, or Rejected.

    Operation
    Description
    TransferTransfer the approval request to another approver.
    ApprovedApprove the request. After clicking Approved, enter Reason if needed and click OK.
    RejectedReject the request. After clicking Rejected, enter Reason for rejection and click OK.

Add a digital watermark to exported Excel files

NineData supports embedding watermarks in exported Excel files. The watermark includes the user's name, which helps trace responsibility if exported data is leaked. Watermarks also remind data users to handle exported files carefully.

Before you begin

  • You have created or joined an organization. See Manage organizations.
  • The NineData console is in organization mode. To switch from personal mode to organization mode, see Switch to organization.
  • You are an Administrator.

Procedure

  1. Sign in to the NineData Console.

  2. Go to DevOps > Policy & Process.
  3. Click the SQL Dev Policy tab, then click the associated Name for the target data source.
  4. The console opens the Details page. Click the Data Export tab, find the Adding digital watermarks to Excel files rule, and turn on the switch under the Status column to enable it.

Encrypt exported files

NineData supports encrypting the compressed package of exported data files and provides a key viewing option on the task page. Only authorized users can obtain the key to decrypt the exported data files.

Before you begin

  • You have created or joined an organization. See Manage organizations.
  • The NineData console is in organization mode. To switch from personal mode to organization mode, see Switch to organization.
  • You are an Administrator.

Procedure

  1. Sign in to the NineData Console.

  2. Go to DevOps > Policy & Process.
  3. Click the SQL Dev Policy tab, then click the Name associated with the target data source.
  4. The console opens the Details page. Click the Data Export tab, find the Data export file encryption rule, and turn on the switch under the Status column.