Code search
The DataWorks code search feature lets you search for code snippets within nodes by keyword. Search results show all nodes that contain the keyword and display the relevant code snippets. This feature helps you trace the source of data changes, such as identifying which task modified a target table. This topic describes how to use code search in Data Development.
Limitations
-
The code search feature is available only in DataWorks Standard Edition and higher.
After you upgrade your edition, historical data automatically synchronizes the next day. Searches performed on the day of the upgrade may return no results or incomplete results.
-
Code search supports searching for nodes only in the DataStudio, Ad Hoc Query, Manually Triggered Workflows, Manually Triggered Task, and Recycle Bin directories. For more information about these features, see DataStudio feature guide.
-
The Manually Triggered Task directory is available only in DataWorks V1.0.
Procedure
-
Go to the DataStudio page.
Log on to the DataWorks console. In the target region, click in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Data Development.
-
In the Data Development directory tree, click the
icon in the top menu bar to open the Search Code page. -
Configure search criteria and view the search results.
The search criteria include the Node Type drop-down list, the Owner input box, the Modification Time date picker, and the Location checkboxes (you can select Data Development, Ad Hoc Query, Manually Triggered Workflows, Manually Triggered Nodes, and Recycle Bin). The Location options correspond to the menus in the left-side navigation pane. Search results appear as cards containing a code preview and metadata such as node type, location, and creation time.
-
Enter a keyword and configure search criteria.
-
In the search box, enter a keyword, such as a code snippet or a table name. The more specific the keyword, the more accurate the results.
For example, you can use a statement fragment like
alter table testor a table name likerpt_user. -
Click Show to the right of the search box to filter by criteria such as Node Type, Owner, and Modified At.
Note-
Advanced search criteria help you quickly find the target node. If you do not configure advanced search criteria, DataWorks searches the entire current workspace by default.
-
Code search supports searching for nodes only in the DataStudio, Ad Hoc Query, Manually Triggered Workflows, Manually Triggered Task, and Recycle Bin directories. For more information about these features, see DataStudio feature guide.
-
The Manually Triggered Task directory is available only in DataWorks V1.0.
-
-
-
Click the Search button.
-
View the search results.
You can view all nodes that contain the keyword and the corresponding code details based on the specified criteria. This helps you quickly locate the target node and identify the change operation. You can also:
-
Click a node name to open its details page.
-
Click Copy Code to copy the current code snippet.
-
-