All Products
Search
Document Center

DataWorks:Code search

Last Updated:Aug 15, 2023

DataWorks provides the code search feature that allows you to query code segments in nodes by keyword. The search results show the details of each segment and the nodes that contain these segments. You can use this feature to trace the node that leads to 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 only available for DataWorks V1.0.

Procedure

  1. Go to the DataStudio page.

    1. Log on to the DataWorks console.

    2. In the left-side navigation pane, click Workspaces.

    3. In the top navigation bar, select the region where the workspace resides. On the Workspaces page, find the workspace in which you want to create tables, and click Shortcuts > Data Development in the Actions column.

  2. In the upper part of the Scheduled Workflow pane, click the Search Code icon icon. The Search Code tab appears on the right. Results of code search
  3. Configure search conditions and view search results.
    Configure search conditions
    1. Enter keywords and configure search conditions.
      1. In Area 1, enter keywords in the search box, such as a code segment 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 Expand Advanced Search next to the search box and set the Search scope, Node type, Responsible person, and Last Modification time parameters to narrow down the query range.
        Note
        • This helps you find the required node in a more accurate and quick manner. 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 only available for DataWorks V1.0.
    2. Click Search.
    3. View the search results.
      In Area 2, you can view all the code segments that match the keywords and the nodes that contain the segments and match the search conditions. This helps you find the required node that causes the 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 segment for further use.