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 volumes of data stored in MaxCompute. In this case, you can quickly obtain query results without the need to transfer data.

Prerequisites

A Hologres compute engine instance is added on the Workspace Management page. This ensures that the Hologres folder is displayed on the page on which you want to create a Hologres SQL node. For more information, see Create and manage workspaces.

Procedure

  1. Go to the DataStudio page.
    1. Log on to the DataWorks console.
    2. In the left-side navigation pane, click Workspaces.
    3. In the top navigation bar, select the region in which the workspace that you want to manage resides. Find the workspace and click DataStudio in the Actions column.
  2. Create a workflow.
    If you have a workflow, skip this step.
    1. Move the pointer over the Create icon icon and select Workflow.
    2. In the Create Workflow dialog box, specify the Workflow Name parameter.
    3. Click Create.
  3. Create a Hologres SQL node.
    1. Move the pointer over the Create icon icon and choose Hologres > Hologres SQL.
      You can also find the workflow in which you want to create a Hologres SQL node, right-click Hologres, and choose Create > Hologres SQL.
    2. In the Create Node dialog box, set the Node Name and Location parameters.
      Note The node name must be 1 to 128 characters in length, and can contain letters, digits, underscores (_), and periods (.).
    3. Click Commit.
  4. On the tab that appears, edit and run the 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.
    Note If you query data by executing a SELECT statement that does not contain the LIMIT clause, a maximum of 200 records are returned by default. If you want to view more query results, add the LIMIT clause at the end of the SELECT 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, a maximum of 500 records are returned.

  5. 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.
  6. Save and commit the node.
    Important You must configure the Rerun and Parent Nodes parameters on the Properties tab before you commit the node.
    1. Click the Save icon in the top toolbar to save the node.
    2. Click the Submit icon in the toolbar.
    3. In the Commit Node dialog box, configure the Change description parameter.
    4. 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.
  7. Perform O&M operations on the node. For more information, see Perform basic O&M operations on auto triggered nodes.