Create a MaxCompute SQL public node
A MaxCompute SQL node is an offline node that runs on a MaxCompute cloud computing resource. You can use SQL statements to process data from MaxCompute data sources. This topic shows how to create a MaxCompute SQL public node.
Prerequisites
A MaxCompute cloud computing resource has been created. For more information, see Create a cloud computing resource.
Procedure
Log on to the Data Resource Platform console.
In the upper-left corner of the page, click the
icon and select Collaboration.In the top menu bar, click the
icon, select the target workspace, and then click Asset Processing.NoteIf you are already on the Asset Processing page, skip the step to click Asset Processing.
In the left-side navigation pane, click the
icon and select public node.Click the
icon. On the public node page, click Create Node.In the Create Node dialog box, select the MaxCompute SQL node type and click OK.
Configure the node on the node editing page.
In the right pane, on the Node Properties tab, specify the node name, node identifier, and node description.
Parameter
Description
Node name
The name of the node. You can customize the name.
Node Identifier
The unique identifier for the node. It must be unique within the same workspace.
Node Directory
The directory where the node is located.
Public node version
When you create the node, the version defaults to development version (Beta). After the first release, the version number increments with each release.
Node description
A description of the node.
On the node editing page, enter the SQL statements and click the
icon.If you need to use a custom function in SQL, click the Referenced Functions tab, find the required custom function in the custom function list, and then return to the editing page to enter it. If the function list is empty, you need to create a function first. For more information, see Create a custom function.
In the Confirm Node Information dialog box, verify that the Node Identifier, Node Name, and Node Directory are correct, and then click Confirm.
Optional: If your code uses input tables, output tables, or node variables, you can add them manually or click the
icon on the editing page to automatically parse the inputs, outputs, and node variables for the public node.The following steps use parsing as an example. The following table describes the parameters.
Click the
icon on the edit page. The automatically parsed inputs, outputs, and node variables are displayed on the Running Configurations tab of the node editing page.Turn on the
switch for Node Input to view the node input.Turn on the Node Output switch
to view the node output.Specify the values for the node variables.
Parameter
Description
Node input
Input identifier
The identifier for the input variable. You can customize this based on the Script Content. Example: Input.
Data structure
Select the logical table for the input data. This defines the data structure of the source table within the cloud computing resource, based on its data model.
If you select a data table, ensure that its data model matches the output data model of the upstream node.
Select an asterisk (*) to allow any data structure. This is useful for tables that do not have a defined data model.
Node output
Output identifier
The identifier for the output variable. You can customize this based on the Script Content. Example: Output.
Data structure
Select the logical table for the output data. This defines the data structure of the destination table within the cloud computing resource, based on its data model.
If you select a data table, ensure that the node's output data model matches the input data model of the downstream node.
Select an asterisk (*) to allow any data structure. This is useful for tables that do not have a defined data model.
Node variable
Variable name
The name of the variable. You can customize the name.
Variable value
The value of the variable, which must be a string.
Variable description
A description of the variable.
On the node editing page, click the
icon in the upper-left corner.Click the
icon. In the Node variable dialog box that opens, verify that the variable names and values are correct, and then click OK.NoteIf parsing detects no variables, the Node variable dialog box does not appear after you click the run icon.
Check the run results and the log. A
Current task status:SUCCESSmessage indicates that the public node ran successfully.