Code Search

更新时间:
复制 MD 格式

The code search feature in Data Studio helps you find code snippets within nodes using keywords. The results show all nodes that contain the snippet, along with relevant details. This is useful for identifying the source task when data in a target table has been modified.

Scope

  • Version requirements: The code search feature is available only in DataWorks Standard Edition and later editions.

  • Search scope: You can use code search to find nodes only in Project Directory, Personal Directory/My Files, Manually Triggered Task, Manual Workflow, and Recycle Bin.

Access Code Search

  1. Go to the Workspaces page in the DataWorks console. In the top navigation bar, select a desired region. Find the desired workspace and choose Shortcuts > Data Studio in the Actions column.

  2. Open the Code Search page using one of the following methods:

    1. In the left navigation bar, click image to go to Data Studio, and on the right of Project Directory and Personal Directory, click image to go to the Search Code page.

    2. In the left navigation bar, click image to go to the MANUALLY TRIGGERED OBJECTS page, and then click image to the right of Manual Workflow or Manually Triggered Task to go to the Search Code page.

      The search filter for Position is automatically selected based on your entry point.

      The Code Search page provides the following filters: Position, Node Type, File Type, Owner, Modification Time, and Deployment Status (Deployed to production/Not deployed to production). You can sort the results by Last Modified. The search results show the code content of matching files with highlighted keywords and the file metadata.

Use Code Search

  1. Enter search Keyword and configure search filters.

    • In the search box, enter your keywords, such as a code snippet or a table name. More specific keywords yield more accurate results.

    • You can also filter by criteria such as Code Location, Node Type, Owner, and Modified At to specify the search scope for keywords.

      Note

      Advanced search filters help you find target nodes faster and more accurately. By default, the search covers the entire workspace.

  2. Press Enter to start the search.

  3. View the search results.

    The results show all nodes and code details that match your keywords and filters. This helps you quickly locate the target node and identify the source of the change. You can also perform the following actions:

    • Click a node name to open its details page.

    • Click Copy Code to copy the code snippet.