Hologres integrates seamlessly with MaxCompute, letting you use standard PostgreSQL statements to query and analyze massive data in MaxCompute without data movement and retrieve results quickly.
Prerequisites
You have bound a Hologres compute resource.
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 already have a Workflow, you can skip this step.
-
Hover over the
icon and select Workflow. -
In the Create Workflow dialog box, enter a Workflow Name.
-
Click Create.
-
-
Create a Hologres SQL node.
-
Hover over the
icon and click .Alternatively, find the target workflow, right-click Hologres, and select .
-
In the Create Node dialog box, enter a Node Name.
NoteThe node name must be 128 characters or fewer and can contain letters, Chinese characters, digits, underscores (_), and periods (.).
-
Click OK.
-
-
In the node editor, write and run the code.
After you create the node, write valid Hologres SQL code. For more information about the SQL syntax, see SELECT.
NoteA
SELECTquery without alimitclause returns a maximum of 200 results by default. To display more results, add alimitclause to theSELECTstatement. A maximum of 10,000 results can be returned.For example, the
select col_1,col_2 from your_table_name where pt>0 limit 500;statement returns 500 results. - On the right side of the node editor, click Scheduling Properties to configure the node's scheduling properties. For more information, see Configure basic properties.
- Save and commit the node.Important
You must configure the rerun property and specify the parent nodes for the node before committing it.
- Click the
icon in the toolbar to save the node. - Click the
icon in the toolbar. - In the Submit New Version dialog box, enter a Change description.
- Click OK.
If you use a workspace in standard mode, click Deploy in the upper-right corner after you commit the node. For more information, see Deploying tasks. - Click the
- For task O&M, see Basic O&M for scheduled tasks.