Shell nodes support standard shell syntax but not interactive syntax.
A Shell node that is run on an exclusive resource group for scheduling may need to access a data store that has a whitelist. In this case, you must add the information about the resource group to the whitelist of the data store. For more information, see Add an exclusive resource group for scheduling to the whitelist of the data store to be accessed.
- Go to the DataStudio page.
- Log on to the DataWorks console.
- In the left-side navigation pane, click Workspaces.
- In the top navigation bar, select the region where your workspace resides, find the workspace, and then click Data Analytics in the Actions column.
- On the Data Development tab, move the pointer over the icon and choose .Alternatively, you can click a workflow in the Business process section, right-click General, and then choose .
- In the New node dialog box, set the Node name and Destination folder parameters.Note The node name must be 1 to 128 characters in length and can contain letters, digits, underscores (_), and periods (.). It is not case-sensitive.
- Click Submit.
- Configure the Shell node.
- Write the code of the Shell node in the code editor.To use the system scheduling parameters in the Shell node, execute the following statement:
echo "$1 $2 $3"Note Separate multiple parameters with spaces. For more information about the system scheduling parameters, see Scheduling parameters.
- Click the icon in the toolbar to save the SQL statement to the server.
- Click the icon in the toolbar to execute the SQL statement you have saved.If you need to change the resource group on which you test the Shell node on the DataStudio page, click the icon in the toolbar and select your desired exclusive resource group.
- Write the code of the Shell node in the code editor.
- On the node configuration tab, click the Scheduling configuration tab in the right-side navigation pane. On the Scheduling configuration tab, set the scheduling properties for the node. For more information, see Basic properties.
- Save and commit the node.Notice You must set the Rerun attribute and Dependent upstream node parameters on the Scheduling configuration tab before you can commit the node.
In a workspace in standard mode, you must click Publish in the upper-right corner after you commit the AnalyticDB for MySQL node. For more information, see Deploy a node.
- Click in the toolbar to save the node.
- Click in the toolbar to commit the node.
- In the Submit New Version dialog box, enter your comments in the Change description field.
- Click OK.
- Test the node. For more information, see Auto triggered nodes.