All Products
Search
Document Center

DataWorks:Code search

Last Updated:Dec 04, 2024

DataWorks provides the code search feature that allows you to query code snippets in nodes by keyword. The search results show the details of each code snippet and the nodes that contain these code snippets. You can use this feature to trace the node that causes changes in a destination table. This topic describes how to use the code search feature on the DataStudio page.

Limits

  • You can use the code search feature only in DataWorks editions that are more advanced than DataWorks Basic Edition.

  • The code search feature allows you to query nodes that you created in the directories of Scheduled Workflow, Ad Hoc Query, Manually Triggered Workflows, Manually Triggered Nodes, and Recycle Bin tabs. For more information about features of each tab, see Features on the DataStudio page.

  • The Manually Triggered Nodes tab is available only in DataWorks V1.0.

Procedure

  1. Go to the DataStudio page.

    Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose Data Development and Governance > Data Development. On the page that appears, select the desired workspace from the drop-down list and click Go to Data Development.

  2. In the upper part of the Scheduled Workflow pane, click the 代码搜索 icon. The Search Code tab appears on the right.代码搜索

  3. Configure search conditions and view search results.

    配置搜索条件

    1. Enter keywords and configure search conditions.

      1. In Area 1, enter keywords in the search box, such as a code snippet or the name of a table. The more specific the keywords, the more relevant the search results.

        Example: Enter alter table test, rpt_user. The alter table test keyword indicates an operation and the rpt_user keyword indicates the name of the table.

      2. Click Show next to the search box and configure more parameters, such as Node Type, Owner, and Modification Time, to narrow down the query range.

        Note
        • This helps you find the required node more accurately and quickly. If you do not configure the advanced search conditions, all nodes in the current workspace are searched by default.

        • The code search feature allows you to query nodes that you created in the directories of Scheduled Workflow, Ad Hoc Query, Manually Triggered Workflows, Manually Triggered Nodes, and Recycle Bin tabs. For more information about features of each tab, see Features on the DataStudio page.

        • The Manually Triggered Nodes tab is available only in DataWorks V1.0.

    2. Click Search.

    3. View the search results.

      In Area 2, you can view all the code snippets that match the keywords and the nodes that contain the code snippets and match the search conditions. This helps you find the required node that causes changes in the destination table. You can also perform the following operations:

      • Click the name of the node to view the details of the node.

      • Click Copy code to copy the code snippet for further use.