This topic describes how to embed and extract data watermarks in Data Management (DMS).
Data watermarks can be used to trace data during the spread and distribution of data.
Identification information is embedded into data or a file as a watermark to identify the data or file.
- Log on to the DMS console V5.0.
- In the top navigation bar, click Database Development. In the left-side navigation pane, choose .
- On the SQL Result Set Export tab, set the parameters that are described in the following
Parameter Description Database Name Required. The database in which you want to export an SQL result set.Note You must have the export permissions on this database. For more information, see View owned permissions. Reason Category Required. The reason for this export. You can specify this parameter to help find the ticket in subsequent operations. Business Background Required. The purpose or objective of this export. You can specify this parameter to help reduce unnecessary communication. Affected Rows Required. The estimated number of data rows to be affected by this export. To obtain the estimated number of affected rows, you can use the
COUNTfunction in SQL statements on the SQLConsole tab.Note In the Precheck step, DMS displays the actual number of affected rows. You can check whether the number of affected rows is as expected. This ensures data security.
Skip Validation Optional. Specifies whether to skip validation. If you select Skip Validation, you must enter a reason in the field next to the check box.Warning After you select Skip Validation, DMS does not check the number of rows that may be affected by this export. If the amount of data to be exported is large, your business may be affected. Proceed with caution. Stakeholder Optional. The stakeholders involved in this export. All specified stakeholders can view the ticket details and take part in the approval process. Irrelevant users other than DMS administrators and database administrators (DBAs) are not allowed to view the ticket details. Export Statement Required. The SQL statements that can be executed to export data. Example:
SELECT * FROM testtable. DMS verifies the syntax of the SQL statements when you submit the ticket. If the syntax is invalid, you cannot submit the ticket.Note Only
SELECTstatements are supported.
Embed Watermark Required. Specifies whether to embed a watermark into the exported file. Select Yes. Embedding Method Required. The method that you want to use to embed the watermark. Valid values:
- Data Watermark: embeds identification information into data. A watermark embedded
by using this method is hard to be perceived by data users.
Note We recommend that you use this method if the number of data entries that you want to export exceeds 200.
- File Watermark: embeds identification information into files. A watermark embedded by using this method is visible to data users.
Data Watermark Message or File Watermark Message Required. The identification information to be embedded as a watermark. Embedded Field Optional. The field into which the watermark is to be embedded.Note If you do not specify a field, DMS selects a field by default. Primary key / Unique Key Optional. The one or more primary keys or unique keys. Separate multiple keys with commas (,).Note To improve the robustness of the watermark, we recommend that you specify this parameter. Attachments Optional. The images or files that are uploaded to add more information about this export.
- Data Watermark: embeds identification information into data. A watermark embedded by using this method is hard to be perceived by data users.
- After you complete the configurations, click Submit and wait for approval. DMS prechecks the SQL statements.
- Click Submit for Approval and wait for approval. Note On the Ticket Details page, you can view the approval progress in the Approval step.
- In the Execute/Automatic Execution step, click Export.
- In the Export Settings dialog box, set the parameters that are described in the following table.
Parameter Description Format Required. The format of the file to be exported. Valid values: CSV, EXCEL, SQL, and JSON. The JSON format is available only for NoSQL databases.Note If you set the Embed Watermark parameter to Yes, set this parameter to EXCEL. Character set Required. The character set of the file to be exported. Valid values: Default Character Set, GBK, UTF-8, and ISO-8859-1. Execution Strategy Required. The strategy used to export the file. Valid values:
- Running immediately: DMS immediately exports the file after you click Confirm Execution.
- Schedule: DMS exports the file at the point in time that you specify. You can specify a point
in time during off-peak hours.
Note The configurations cannot be modified after you set this parameter to Schedule and confirm the configurations.
Export Mode Required. The export mode of the file. Valid values:
Note DMS exports the file based on your configurations. You can view the export progress in the Execute/Automatic Execution step.
- Speed Mode: If you select this mode, the export task cannot be terminated during the export.
- Ordinary Mode: If you select this mode, the export task can be terminated during the export.
- After the file is exported, click Download Exported File to download the file.
DMS provides the watermark extraction feature that allows you to check whether files are embedded with watermarks, especially those hard to be perceived.
- Log on to the DMS console V5.0.
- In the top navigation bar, click Data Watermark. . In the left-side navigation pane, click
- In the upper-right corner of the Data Watermark tab, click Data Watermark. On the
Ticket Application page, set the parameters that are described in the following table.
Parameter Description File type Required. The type of the file from which you want to extract a watermark. Valid values:
Upload a file Required. The file from which you want to extract the watermark.Note Only .xlsx files and .csv files are supported. Business Background Required. The purpose of this extraction. You can specify this parameter to help reduce unnecessary communication. Database Name Optional. The database in which the file was exported. Primary key / Unique Key Optional. The one or more primary keys or unique keys. Separate multiple keys with commas (,).Note If primary keys or unique keys were specified when the watermark was embedded, we recommend that you specify the same primary keys or unique keys as those specified when the watermark was embedded. This improves the accuracy of watermark extraction. Embedded Field Optional. The field into which the watermark was embedded.
- Click Submit.
- After the ticket is approved, click Execute in the Execute/Automatic Execution step. After the execution is complete, you can view the extraction status and the details of the extracted watermark.