This topic describes how to create a Hologres SQL node. Hologres seamlessly integrates with MaxCompute at the underlying layer. This integration allows you to use standard PostgreSQL statements to query and analyze large amounts of data stored in MaxCompute. In this case, you do not need to transfer data. This allows you to quickly obtain query results.
Prerequisites
A Hologres compute engine is added on the Workspace Management page. This ensures that the Hologres folder is displayed in the Scheduled Workflow pane. For more information, see Create and manage workspaces.
Procedure
Go to the DataStudio page.
Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose . On the page that appears, select the desired workspace from the drop-down list and click Go to Data Development.
Create a workflow.
If you have an existing workflow, skip this step.
Move the pointer over the icon and select Workflow.
In the Create Workflow dialog box, configure the Workflow Name parameter.
Click Create.
Create a Hologres SQL node
Move the pointer over the icon and choose .
You can also find the workflow in which you want to create a Hologres SQL node, right-click Hologres, and choose
.In the Create Node dialog box, configure the Node Name parameter.
NoteThe node name cannot exceed 128 characters in length and can contain letters, digits, underscores (_), and periods (.).
Click Commit.
On the configuration tab of the ODPS SQL node, write and run code in the code editor.
After the Hologres SQL node is created, edit the code in compliance with the Hologres SQL syntax. For more information about the Hologres SQL syntax, see SELECT.
NoteIf you query data by executing a
SELECT
statement that does not contain theLIMIT
clause, a maximum of 200 records are returned by default. If you want to view more query results, add theLIMIT
clause at the end of theSELECT
statement. A maximum of 10,000 records can be returned.For example, if you execute the
select col_1,col_2 from your_table_name where pt>0 limit 500;
statement to query data, a maximum of 500 records are returned.On the node configuration tab, click the Properties tab in the right-side navigation pane and configure scheduling properties for the node. For more information, see Configure basic properties.
Save and commit the node.
ImportantYou must configure the Rerun and Parent Nodes parameters on the Properties tab before you commit the node.
Click the icon in the top toolbar to save the node.
Click the icon in the toolbar.
In the Commit Node dialog box, configure the Change description parameter.
Click OK.
If the workspace that you use is in standard mode, you must click Deploy in the upper-right corner to deploy the node after you commit it. For more information, see Deploy nodes.
Perform O&M operations on the node. For more information, see Perform basic O&M operations on auto triggered nodes.